I'm making a form with datetime.... The form is worked but I want to disable the past date on datepicker... so, the user cannot choose the day past.... Any suggestion for this?
The code should work okay, I tested it and just tested it again.
With the above code when I click on the date field the datepicker opens, and earlier dates are greyed-out and inactive (see screenshot).
Then when I select a date it adds the text date to the date field. (There is also a hidden field updated with the timestamp which is the actual data that will be stored.)
Submitting the form, the chosen date is saved, as normal.
When you say your data is not saved, does it work normally when you don't use the code to modify the datepicker options?
Apologies for butting in but I can't get this code to work either. I looked in & outside the forum for solutions and finally came up with this that works (thanks to this forum thread from 2017 /forums/topic/use-custom-jquery-ui-datepicker-as-the-credform-datepicker-doesnt-customize/#post-595275):-