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

Using a timeSuffix that starts with a space causes "Error parsing the date/time string: Wrong time format" #720

Open ScottDennison opened 10 years ago

ScottDennison commented 10 years ago

When using a timeSuffix that starts with a space, the error "Error parsing the date/time string: Wrong time format" is logged to the console every time a date is selected in the picker.

Tested with the following configuration, with both ' UTC' and ' BLAH'. Space-less versions work correctly.

            {
                altField: '#txtPriceChangeALFDateAlt',
                altFormat: 'yy-mm-dd',
                altSeparator: 'T',
                altTimeFormat: 'HH:mm:ss.lZ',
                altTimeSuffix: ' ',
                autoSize: true,
                dateFormat: 'dd/mm/yy',
                timeFormat: 'HH:mm:ss',
                timeSuffix: '\' UTC\'',
                suffix: ' ',
                maxDate: 0,
                minDate: "-3m",
                showMillisec: false,
                showTimezone: false,
                altFieldTimeOnly: false,
                timezone: 0,
                showOn: "button",
                buttonImage: Common.baseUrl + "/resources/img/calendar_icon.png",
                buttonImageOnly: true
            }