I don't understand about the lowercase/uppercase thing. But I do know that datePicker expects the 4-digit format string to be 'yy' not 'yyyy'. Maybe that's the problem.
I do think it *should* be 'yyyy', though. 'yy' is a bad choice, IMHO. http://docs.jquery.com/UI/Datepicker/%24.datepicker.formatDate On Mon, Jan 5, 2009 at 12:10 AM, Praveen <praveen.python.pl...@gmail.com> wrote: > > Hi all, > i have tried my best and googled like anything but could not get the > solution > when i use datepicker (all are in small letters) > > <script type="text/javascript" src="/static_media/js/ > ui.datepicker.js"></script> > function customRange(input) { > return {minDate: (input.id == "sd" ? $("#ed").datepicker > ("getDate") : null), > maxDate: (input.id == "ed" ? $("#sd").datepicker("getDate") : > null)}; > $("#sd,#ed").datepicker({ beforeShow: customRange, showOn: > "both", }); > > sd and ed is id of the input box > > it shows me calendar with prev and next button. but its default format > is mm/dd/yyyy which i want to convert in yyyy-mm-dd but there wers not > function i could found so i tried with > Date.format = 'yyyy-mm-dd'; > and thought that could have helped me but could not. > > but when i use datePicker ('p' in CAPS letters) for which i am using > <script type="text/javascript" src="/static_media/js/datePicker.js"></ > script> > function customRange1(input) { > return {minDate: (input.id == "date-pick2" ? $("#date- > pick1").datePicker("getDate") : null), > maxDate: (input.id == "date-pick1" ? $("#date- > pick2").datePicker("getDate") : null)}; > > date-pick1 and date-pick2 is id of the input box > > it shows me calendar with next button there is no previous button so i > can not go to prev month of the current month. default format is mm/dd/ > yyyy. > when i am writing > > $.datePicker.setDateFormat('ymd','-'); // unicode its changing my > format as i i wanted. > but if i choose datepicker thenk i am not able to convert the format > to yyyy-mm-dd > if i choose datePicker then i am not able to go prev month of the > current month > > and i am not getting why Date.format = 'yyyy-mm-dd'; is not working. > > please visit this link where i have written the code > > http://dpaste.com/105471/ > > all the suggestion would be really appreciable. > > thanks