is there any easy to validate a time field entry against the current date and time?i get date and time entry from an user in two separate fields. I used jquery date picker and time picker for both. with the date I had the option to show current date and future dates and not the past dates so it’s good. with the time field i have to show all the time but want to somehow validate to see if the time is already gone for that date.I can o away from jquery and just use php if possible. any ideas?g
Share
You can do
This will tell if the given time is in the past. The only requirement is that
$field_valueis in a format thatstrtotimerecognizes. This will interpret the date in the default timezone you have set (seedate_default_timezone_set).