Validating dates with date picker in Umbraco
# help-with-umbraco
t
Hi I'm using the default date picker in Umbraco. I have two added to my document type. Is there anyway to validate the first date picker selected date is not after the second date picker? Thanks
l
Have you tried DateTime.Compare (if .Net 9)? Or GreaterThan (.Net 8)? Assuming you're writing C#, and depending on what version of Umbraco you're running (thus what version of .Net), there are lots of available methods for datetimes :3 https://learn.microsoft.com/en-us/dotnet/api/system.datetime.compare?view=net-9.0
11 Views