We are having an issue where any custom options that we apply to a datepicker on a form will get wiped out if the input element is clicked. However, if you click the calendar icon, it works fine.
Here's an example of what we are doing.
$('#Field1').datepicker('option', 'minDate', new Date()); $('#Field1').datepicker('option', 'beforeShowDay', function(date){ if(date.getDay() == 0 || date.getDay() == 6) { return [false, "", "Closed on weekends"]; } if(date.getDay() == 3) { return [false, "", "Closed on Wednesdays"]; } return [true, "", "Appointments available"]; });
Clicking on the calendar icon shows something like this.
According to the console, all of the settings are correct.
If you click on the input element directly, you just get a default calendar. Looking in the console will show that the datepicker jQuery object has been set back to default values.
Here is the console from before and after clicking in the input element:
We've verified this behavior in several browsers, and the jQuery datepicker works fine outside of Forms.
Our current testing is in a completely vanilla form, with no other JavaScript or CSS present.
The environment we are testing against is: Laserfiche Forms Professional Version 10.4.3.198