JQuery UI Datepicker parseDate 'Missing number at position 6'

Tom Maeckelberghe picture Tom Maeckelberghe · Mar 22, 2011 · Viewed 13.3k times · Source

I need to parse dates like '070126' to '26 Jan 2007'. I thought I could use the datepicker, but it gives me the an error...

$.datepicker.parseDate('ymmdd', '070126') #=> Missing number at position 6

I am starting to think that this could be a bug...

$.datepicker.parseDate('y-mm-dd', '07-01-26') #=> Fri Jan 26 2007 00:00:00 GMT+0100 (CET)

Any advice?

Thanks..

Answer

mdrg picture mdrg · Mar 22, 2011

Are you sure it is not working? I have no problems with your code: http://jsfiddle.net/ND2Qg/