Kludge to fix ISO timestamp parsing in AutoFieldWidget
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Jun 2010 15:31:05 +0000 (15:31 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Jun 2010 15:31:05 +0000 (15:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16742 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js

index 5c0ee87..1d60d71 100644 (file)
@@ -224,7 +224,11 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
                         dojo.require('dojo.date.stamp');
                         this.widget = new dijit.form.DateTextBox(this.dijitArgs, this.parentNode);
                         if(this.widgetValue != null) 
-                            this.widgetValue = dojo.date.stamp.fromISOString(this.widgetValue);
+                            this.widgetValue = dojo.date.stamp.fromISOString(
+                                // Kludge until the ML returning ISO timestamps with a colon in the timezone offset,
+                                // which dojo.date.stamp.fromISOString requires
+                                this.widgetValue.replace( /^(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d-\d\d)(\d\d)$/, '$1:$2') 
+                            );
                         break;
 
                     case 'bool':