trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

Version 1.4.3 Doesn't work with masked input plugin version 1.3.1 #694

Open slominskir opened 10 years ago

slominskir commented 10 years ago

I'm getting the following error on the Javascript console:

Error parsing the date/time string: Unexpected literal at position 11 date/time string = 20-Mar-2014 03:00 timeFormat = HH:mm dateFormat = dd-M-yy hh:mm

I'm invoking the plugin like so:

$(".date-field").datetimepicker({
    dateFormat: 'dd-M-yy',
    controlType: myControl
}).mask("99-aaa-9999 99:99");
slominskir commented 10 years ago

Looks like I need to tell masked input to use spaces and not underscore '_' otherwise datetime picker has the parse error:

$(".date-field").datetimepicker({ dateFormat: 'dd-M-yy', controlType: myControl, timeFormat: 'HH:mm' }).mask("99-aaa-9999 99:99",{placeholder:" "});