FanaticZine

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]

1 Comment :, , , more...

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
2 Comments :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

  • Dedicated for entertainment