babakhani / pwt.datepicker

Javascript jalaali calendar capable datepicker widget
http://babakhani.github.io/PersianWebToolkit/datepicker
614 stars 140 forks source link

The setDate Method works incorrectly !! #41

Closed mohamadz14 closed 9 years ago

mohamadz14 commented 9 years ago

there is a problem with setDate Method in your calendar .. for example when i use the : $("#example1" ).pDatepicker("setDate","2015,12,24,11,11" );

the input text shows the date : 772-11-14 12:42:48 PM date !!

babakhani commented 9 years ago

Hi As can be seen in document currently this method accept persian date array, dot.net date format, unix date and javascript date object. something like : [1391,12,3,12,11] your string input "2015,12,24,11,11" is not parsable to persian date library.

mohamadz14 commented 9 years ago

i have tested both persian and gregorian dates , and the problem exists in both dates !

babakhani commented 9 years ago

You must define date as Array not as a string.