jquery - Bootstrap datepicker - Parse date -


i'm using pretty eternicode's/bootstrap-datepicker jquery plugin.

i'm trying use included dpglobal tools date operations.

example:

dpg = $.fn.datepicker.dpglobal; date_format = 'dd/mm/yyyy'; date_str = '31/12/2013'; console.log(dpg.parsedate(start, date_format)); 

returns me (on firefox)

typeerror: format.parts undefined

what doing wrong ?


check out my fiddleable example

you have parse format before use parsedate(...) :) .

dpg.parsedate(date_str, dpg.parseformat(date_format)) 

i've updated fiddle.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -