From 2c43879a46d41060b68963778388ec582e00fa43 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Tue, 25 Oct 2016 18:27:31 +0200 Subject: Datepicker: Use simple split instead of globalize for parsing attributes This reverts commit ea986f2808684c0112d56776d76ea35e9cdb77da. --- ui/widgets/datepicker.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js index e2e9037e8..6e1f5be73 100644 --- a/ui/widgets/datepicker.js +++ b/ui/widgets/datepicker.js @@ -81,7 +81,11 @@ var widget = $.widget( "ui.datepicker", { _getCreateOptions: function() { var max = this.element.attr( "max" ), min = this.element.attr( "min" ), - parser = new Globalize( "en" ).dateParser( { raw: "yyyy-MM-dd" } ), + parser = function( value ) { + var exploded = value.split( "-" ); + + return new Date( exploded[ 0 ], exploded[ 1 ] - 1, exploded[ 2 ] ); + }, options = {}; if ( max !== undefined ) { -- cgit v1.2.3