Hi,
I'm trying to use a jQuery datepicker and I can't seem to get it work regardless where I put the code and using,
window.onload = function or the window.addEventListener('load', function.
The jQuery code that controls the date pickers is:
$("#ArrDate").datepicker({
dateFormat: 'dd-mm-yy',
minDate: 1,
changeMonth: true,
changeYear: true,
onSelect: function() {
$("#RtnDate").datepicker("option","dateFormat", 'dd-mm-yy');
$("#RtnDate").datepicker("option", "disabled", false);
$("#RtnDate").datepicker("option","minDate", $(this).datepicker("getDate"))
}
});
$("#RtnDate").datepicker({ minDate: 0, disabled: true });
At the moment I have an element with the following HTML code:
Departure Date:<input type="text" id="ArrDate" />
Return date: <input type="text" id="RtnDate" />
Can someone please help?
Simon.
Hi, I'm trying to use a jQuery datepicker and I can't seem to get it work regardless where I put the code and using, window.onload = function or the window.addEventListener('load', function. The jQuery code that controls the date pickers is: $("#ArrDate").datepicker({ dateFormat: 'dd-mm-yy', minDate: 1, changeMonth: true, changeYear: true, onSelect: function() { $("#RtnDate").datepicker("option","dateFormat", 'dd-mm-yy'); $("#RtnDate").datepicker("option", "disabled", false); $("#RtnDate").datepicker("option","minDate", $(this).datepicker("getDate")) } }); $("#RtnDate").datepicker({ minDate: 0, disabled: true }); At the moment I have an element with the following HTML code: Departure Date:<input type="text" id="ArrDate" /> Return date: <input type="text" id="RtnDate" /> Can someone please help? Simon.Last edited 08 July 2020 by simonusher3