Bootstrap datepicker - Parse date
datepicker, jquery, twitter-bootstrap
Solution
You also have to parse the format before you use `parseDate(...)` :) .
dpg.parseDate(date_str, dpg.parseFormat(date_format))
I've updated your fiddle.
Problem
I'm using the pretty good eternicode's/bootstrap-datepicker jQuery plugin. I'm trying to use the included DPGlobal tools to do some 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 is undefined What am I doing wrong ? Check out my fiddleable example