jQuery date picker

simonusher3
28 Posts
simonusher3 posted this 08 July 2020
Ask a Question

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

Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 09 July 2020

Hi,

jQuery datepicker uses JqueryUI library https://jqueryui.com/datepicker/. And Nicepage use only Jquery library, so please add a script for this library:

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js">
</script>

under Site Settings » » HTML » Additional Head

...................................................
Sincerely,
Susanna I.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, jQuery datepicker uses **JqueryUI** library https://jqueryui.com/datepicker/. And Nicepage use only Jquery library, so please add a script for this library: <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"> </script> under Site Settings » » HTML » Additional Head ................................................... Sincerely, Susanna I. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments