JQuery
change date range of JQuery Datepicker
by Dush on Nov.20, 2008, under Development, JQuery
here is the code. this will set the datapicker year from 1956 to 2003..
[sourcecode language='javascript']
$(‘#dateofbirth’).datepicker({
yearRange: ’1956:2003′
});[/sourcecode]
How to format date, Jquery UI Datepicker
by Dush on Nov.14, 2008, under JQuery
Yes, if you are reading this artical, probably you also must have looking for same thing just like I did few mins ago, well let’s just not keep you searching no more.. so here it is
[sourcecode language='javascript']$(‘#txtDate’).datepicker({
dateFormat: ‘dd/mm/yy’
});[/sourcecode]
on this example I have used European data format (dd/mm/yy) , you can customize your formatting using following parameters. (from JQuery UI documentation)
- d – day of month (no leading zero)
- dd – day of month (two digit)
- D – day name short
- DD – day name long
- m – month of year (no leading zero)
- mm – month of year (two digit)
- M – month name short
- MM – month name long
- y – year (two digit)
- yy – year (four digit)
- ‘…’ – literal text
- ” – single quote
