How do I pre-populate a jQuery Datepicker textbox with today’s date?

I have a very simple jQuery Datepicker calendar: $(document).ready(function(){ $(“#date_pretty”).datepicker({ }); }); and of course in the HTML… <input type=”text” size=”10″ value=”” id=”date_pretty”/> Today’s date is nicely highlighted for the user when they bring up the calendar, but how do I get jQuery to pre-populate the textbox itself with today’s date on page load, without … Read more

jQuery UI: Datepicker set year range dropdown to 100 years

Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added. How can we set the initial range to be 100 years so that the user will see a large list by default? function InitDatePickers() { $(“.datepicker”).datepicker({ changeMonth: … Read more

jQuery UI DatePicker – Change Date Format

I am using the UI DatePicker from jQuery UI as the stand alone picker. I have this code: <div id=”datepicker”></div> And the following JS: $(‘#datepicker’).datepicker(); When I try to return the value with this code: var date = $(‘#datepicker’).datepicker(‘getDate’); I am returned this: Tue Aug 25 2009 00:00:00 GMT+0100 (BST) Which is totally the wrong … Read more