First bit of changing over from calendar.js to the dojo calendar. There are
authorJoseph Lewis <joehms22@gmail.com>
Wed, 3 Aug 2011 19:01:08 +0000 (13:01 -0600)
committerJoseph Lewis <joehms22@gmail.com>
Wed, 3 Aug 2011 19:01:08 +0000 (13:01 -0600)
a few problems left to convert, and testing needs to be done too.

Signed-off-by: Joseph Lewis <joehms22@gmail.com>
Open-ILS/web/opac/common/js/strftime.js [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt_common.xhtml
Open-ILS/web/reports/oils_rpt_widget.js
Open-ILS/web/reports/xul/template-config.js
Open-ILS/web/reports/xul/template_builder.xul
Open-ILS/xul/staff_client/server/admin/cash_reports.js
Open-ILS/xul/staff_client/server/admin/cash_reports.xhtml
Open-ILS/xul/staff_client/server/admin/closed_dates.js
Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml
Open-ILS/xul/staff_client/server/main/data.xul
Open-ILS/xul/staff_client/server/patron/ue.xhtml

diff --git a/Open-ILS/web/opac/common/js/strftime.js b/Open-ILS/web/opac/common/js/strftime.js
new file mode 100644 (file)
index 0000000..c1ce22c
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * strftime.js - A strftime implementation.
+ *
+ * Created by Joseph Lewis joehms22 at gmail dot com
+ * Copyright 2011
+ * Licensed under the LGPL: http://www.gnu.org/licenses/lgpl.html
+ *
+ *
+ * This file includes contents taken from the Dynarch calendar:
+ * www.dynarch.com/projects/calendar, originally copyrighted by Mihai 
+ * Bazon, and released under the GNU Lesser General Public License.
+ */
+
+
+/** Returns the number of the week in year, as defined in ISO 8601. */
+Date.prototype.getWeekNumber = function() {
+       var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+       var DoW = d.getDay();
+       d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
+       var ms = d.valueOf(); // GMT
+       d.setMonth(0);
+       d.setDate(4); // Thu in Week 1
+       return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
+};
+
+/** Returns the number of day in the year. */
+Date.prototype.getDayOfYear = function() {
+       var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+       var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+       var time = now - then;
+       return Math.floor(time / Date.DAY);
+};
+
+/** Prints the date in a string according to the given format. 
+    See http://linux.die.net/man/3/strftime for formatting options,
+    note that all may not work in this implementation.
+
+*/
+function strftime (str, date) {
+       var m = date.getMonth();
+       var d = date.getDate();
+       var y = date.getFullYear();
+       var wn = date.getWeekNumber();
+       var w = date.getDay();
+       var s = {};
+       var hr = date.getHours();
+       var pm = (hr >= 12);
+       var ir = (pm) ? (hr - 12) : hr;
+       var dy = date.getDayOfYear();
+       if (ir == 0)
+               ir = 12;
+       var min = date.getMinutes();
+       var sec = date.getSeconds();
+       s["%a"] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; //[FIXME: I18N]
+       s["%A"] = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; // full weekday name
+       s["%b"] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // abbreviated month name [FIXME: I18N]
+       s["%B"] = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; // full month name
+       s["%C"] = 1 + Math.floor(y / 100); // the century number
+       s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
+       s["%e"] = d; // the day of the month (range 1 to 31)
+       // FIXME: %D : american date style: %m/%d/%y
+       // FIXME: %E, %F, %G, %g, %h (man strftime)
+       s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
+       s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
+       s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
+       s["%k"] = hr;           // hour, range 0 to 23 (24h format)
+       s["%l"] = ir;           // hour, range 1 to 12 (12h format)
+       s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
+       s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
+       s["%n"] = "\n";         // a newline character
+       s["%p"] = pm ? "PM" : "AM";
+       s["%P"] = pm ? "pm" : "am";
+       // FIXME: %r : the time in am/pm notation %I:%M:%S %p
+       // FIXME: %R : the time in 24-hour notation %H:%M
+       s["%s"] = Math.floor(date.getTime() / 1000);
+       s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
+       s["%t"] = "\t";         // a tab character
+       // FIXME: %T : the time in 24-hour notation (%H:%M:%S)
+       s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
+       s["%u"] = w + 1;        // the day of the week (range 1 to 7, 1 = MON)
+       s["%w"] = w;            // the day of the week (range 0 to 6, 0 = SUN)
+       // FIXME: %x : preferred date representation for the current locale without the time
+       // FIXME: %X : preferred time representation for the current locale without the date
+       s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
+       s["%Y"] = y;            // year with the century
+       s["%%"] = "%";          // a literal '%' character
+
+       var re = /%./g;
+    
+       var a = str.match(re);
+       for (var i = 0; i < a.length; i++) {
+               var tmp = s[a[i]];
+               if (tmp) {
+                       re = new RegExp(a[i], 'g');
+                       str = str.replace(re, tmp);
+               }
+       }
+
+       return str;
+}
index c1aad54..f26e8c2 100644 (file)
@@ -22,7 +22,7 @@
 </script>
 
 <script type='text/javascript' src='/opac/common/js/utils.js'> </script>
-<script type='text/javascript' src='/opac/common/js//config.js'> </script> 
+<script type='text/javascript' src='/opac/common/js/config.js'> </script> 
 <script type='text/javascript' src='/opac/common/js/CGI.js'> </script>
 <script type='text/javascript' src='/opac/common/js/JSON_v1.js'> </script>
 <script type='text/javascript' src='/opac/common/js/fmall.js'> </script>
@@ -37,6 +37,7 @@
 <script type='text/javascript' src='/opac/common/js/fm_table.js'> </script>
 <script type='text/javascript' src='/opac/common/js/fm_table_conf.js'> </script>
 <script type='text/javascript' src='/opac/common/js/md5.js'> </script>
+<script type='text/javascript' src='/opac/common/js/strftime.js'> </script>
 <script type="text/javascript">
        stpicopen  = '../opac/images/slimtree/folder2.gif';
        stpicclose = '../opac/images/slimtree/folderopen2.gif';
index 7e644ec..928a849 100644 (file)
@@ -195,6 +195,16 @@ function oilsRptMonitorWidget(input, regex) {
 }
 
 
+function Calendar() {
+    
+}
+
+Calendar.prototype.setup(args) {
+    
+}
+Calendar.prototype.getValue() {
+    
+}
 
 
 /* --------------------------------------------------------------------- 
index 46c66ac..548c838 100644 (file)
@@ -1,6 +1,11 @@
 dojo.requireLocalization("openils.reports", "reports");
+dojo.require("dijit.dijit");
+dojo.require("dijit._Calendar");
 
 var rpt_strings = dojo.i18n.getLocalization("openils.reports", "reports");
+var currObject; //Used to hold the date objects for the calendar, once
+                               //we transitioned from calendar.js to dojo.
+var cal_popup = $('calendar-widget');
 
 function removeReportAtom (args) {
        if (!args) args = {};
@@ -310,10 +315,18 @@ function removeTemplateFilterValue () {
        return true;
 }
 
-function timestampSetDate (obj, cal, date) {
-       obj.op_value.value = date;
-       obj.op_value.object = cal.date;
-       obj.op_value.label = '"' + date + '"';
+var datefmt;
+//Upon the calendar change.
+function calChange(date_str) {
+               var ds = strftime(datefmt, new Date(date_str))
+               timestampSetDate(currObject, new Date(date_str), ds);
+               cal_popup.hidePopup();
+}
+
+function timestampSetDate (obj, date_obj, date_str) {
+       obj.op_value.value = date_str;
+       obj.op_value.object = date_obj;
+       obj.op_value.label = '"' + date_str + '"';
 
        renderSources(true);
        return true;
@@ -354,20 +367,13 @@ function changeTemplateFilterValue () {
 
                switch (obj.datatype) {
                        case 'timestamp':
-                               var cal_popup = $('calendar-widget');
 
                                while (cal_popup.firstChild) cal_popup.removeChild(cal_popup.lastChild);
-                               var calendar = new Calendar(
-                                       0,
-                                       obj.op_value.object,
-                                       function (cal,date) { return timestampSetDate(obj,cal,date) },
-                                       function (cal) { cal_popup.hidePopup(); cal.destroy(); return true; }
-                               );
 
-                               var format = OILS_RPT_TRANSFORMS[obj.transform].cal_format || '%Y-%m-%d';
+                               currObject = obj;
+                               new dijit._Calendar({value: 'now', onChange:'calChange(arguments[0]);'}, "calendar-widget");
 
-                               calendar.setDateFormat(format);
-                               calendar.create(cal_popup);
+                               datefmt = OILS_RPT_TRANSFORMS[obj.transform].cal_format || '%Y-%m-%d';
 
                                targetCmd.menu = 'calendar-widget';
 
index 40fffac..ba2ced2 100644 (file)
@@ -41,6 +41,7 @@
 <script src='/opac/common/js/org_utils.js' type="application/x-javascript; e4x=1"/>
 <script src='/opac/common/js/RemoteRequest.js' type="application/x-javascript; e4x=1"/>
 <script src='/opac/common/js/md5.js' type="application/x-javascript; e4x=1"/>
+<script src='/opac/common/js/strftime.js' type="application/x-javascript; e4x=1"/>
 
 <script src="../adminlib.js" type="application/x-javascript; e4x=1"/>
 
@@ -58,9 +59,6 @@
 ]]> 
 </script>
 
-<script type="application/x-javascript; e4x=1" src="/opac/common/js/jscalendar/calendar.js"/>
-<script type="application/x-javascript; e4x=1" src="/opac/common/js/jscalendar/lang/calendar-en.js"/>
-<script type="application/x-javascript; e4x=1" src="/opac/common/js/jscalendar/calendar-setup.js"/>
 
 <groupbox flex="1">
        <caption label="&reports.xul.template_builder.db_source_browser.label;"/>
index c55431d..d75b45a 100644 (file)
@@ -11,7 +11,6 @@ function crInit() {
     setTimeout( 
         function() { 
             fetchHighestPermOrgs( SESSION, USER.id(), myPerms );
-            crSetCals();
             crBuildOrgs();
             crDrawRange();
         }, 
@@ -19,33 +18,7 @@ function crInit() {
     );
 }
 
-function crSetCals() {
-
-    Calendar.setup({
-        inputField  : "cr_start",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cr_start_trigger",
-        align       : "Tl",           
-        singleClick : true
-    });
-
-    Calendar.setup({
-        inputField  : "cr_end",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cr_end_trigger",
-        align       : "Tl",           
-        singleClick : true
-    });
-
-    var d = new Date();
-    var y = d.getYear()+1900;
-    var m = ((d.getMonth()+1)+'').replace(/^(\d)$/,'0$1');
-    var da = (d.getDate()+'').replace(/^(\d)$/,'0$1');
-
-    var dat = y+'-'+m+'-'+da;
-    $('cr_start').value = dat;
-    $('cr_end').value = dat;
-}
+
 
 
 function crCurrentOrg() {
index eadabca..5aef630 100644 (file)
@@ -11,7 +11,7 @@
     <head>
         <title>&staff.server.admin.cash.title;</title>
         <script language='javascript' src='/opac/common/js/utils.js'> </script>
-        <script language='javascript' src='/opac/common/js//config.js'> </script>
+        <script language='javascript' src='/opac/common/js/config.js'> </script>
         <script language='javascript' src='/opac/common/js/CGI.js'> </script>
     
         <script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
         <script language='javascript' src='/opac/common/js/fm_table.js'> </script>
         <script language='javascript' src='/opac/common/js/fm_table_conf.js'> </script>
 
-        <link rel="stylesheet" type="text/css" media="all" 
-            href="/opac/common/js/jscalendar/calendar-brown.css" title="win2k-cold-1" />
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-en.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script>
+        <script type='text/javascript' djConfig='parseOnLoad: true,isDebug:false' src='/js/dojo/dojo/dojo.js'></script>
+        <link type='text/css' rel='stylesheet' href='/js/dojo/dojo/resources/dojo.css' />
+        <link type='text/css' rel='stylesheet' href='/js/dojo/dijit/themes/tundra/tundra.css' />
 
 
         <link type='text/css' rel='stylesheet' href='admin.css' />
         <link type='text/css' rel='stylesheet' href="/opac/common/css/fm_table.css"/>
     </head>
 
-    <body onload='crInit();'>
+    <body onload='crInit();' class='tundra'>
 
         <div class='welcome_box'>
             <span>&staff.server.admin.cash.welcome;</span><b><span id='user'/></b>
         </div>
 
+        <!--TODO Remove <Center> tag, this isn't proper HTML-->
         <center>
 
             <span style='padding-left: 15px;'>&staff.server.admin.cash.start_date;</span>
-            <input type='text' id='cr_start' size='10' maxlength='10'> </input>
-            <button style='padding: 0px;' id='cr_start_trigger'>
-                <img src="/opac/common/js/jscalendar/img.gif" 
-                    style="cursor: pointer; border: 1px solid red; padding: 0px; margin: -3px;" 
-                    title="&staff.server.admin.cash.date.select;"
-                    onmouseover="this.style.background='red';" 
-                    onmouseout="this.style.background=''" />
-            </button>
+            <input type="text" name="cr_start" id="cr_start" value="now" dojoType="dijit.form.DateTextBox" />
+
 
             <span style='padding-left: 15px;'>&staff.server.admin.cash.end_date;</span>
-            <input type='text' id='cr_end' size='10' maxlength='10'> </input>
-            <button style='padding: 0px;' id='cr_end_trigger'>
-                <img src="/opac/common/js/jscalendar/img.gif" 
-                    style="cursor: pointer; border: 1px solid red; padding: 0px; margin: -3px;" 
-                    title="&staff.server.admin.cash.date.select;"
-                    onmouseover="this.style.background='red';" 
-                    onmouseout="this.style.background=''" />
-            </button>
+            <input type="text" name="cr_end" id="cr_end" value="now" dojoType="dijit.form.DateTextBox" />
+
 
             <div class='pad' style='padding-left: 10px; font-size: 8pt;'>&staff.server.admin.cash.date_format;</div>
 
index 09c78bb..5031c3c 100644 (file)
@@ -29,8 +29,6 @@ function cdEditorInit() {
     cdAllDayTemplate                = cdTbody.removeChild($('cd_allday_row'));
     cdAllMultiDayTemplate        = cdTbody.removeChild($('cd_allmultiday_row'));
 
-    cdInitCals();
-
     fetchUser();
     $('cd_user').appendChild(text(USER.usrname()));
 
@@ -82,50 +80,6 @@ function cdBuildOrgs() {
     return gotoOrg;
 }
 
-function cdInitCals() {
-
-    Calendar.setup({
-        inputField  : "cd_edit_allday_start_date",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cd_edit_allday_start_date_img",
-        align       : "Tl",
-        singleClick : true
-    });
-
-    Calendar.setup({
-        inputField  : "cd_edit_allmultiday_start_date",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cd_edit_allmultiday_start_date_img",
-        align       : "Tl",
-        singleClick : true
-    });
-
-    Calendar.setup({
-        inputField  : "cd_edit_allmultiday_end_date",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cd_edit_allmultiday_end_date_img",
-        align       : "Tl",
-        singleClick : true
-    });
-
-    Calendar.setup({
-        inputField  : "cd_edit_end_date",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cd_edit_end_date_img",
-        align       : "Tl",
-        singleClick : true
-    });
-
-    Calendar.setup({
-        inputField  : "cd_edit_start_date",
-        ifFormat    : "%Y-%m-%d",
-        button      : "cd_edit_start_date_img",
-        align       : "Tl",
-        singleClick : true
-    });
-
-
-}
 
 function cdDrawRange( start, end, alertSuccess ) {
     start = (start) ? start : new Date().getYear() + 1899 + '-01-01'; /* include last year's closed info for comparison */
index a3af761..f38805c 100644 (file)
@@ -7,6 +7,8 @@
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+    
+    <!--TODO I18N WHOLE FILE-->
 
     <head>
         <title>&staff.server.admin.closed_dates.title;</title>
         <script type='text/javascript' src='adminlib.js'> </script>
         <script type='text/javascript' src='closed_dates.js'> </script>
 
-        <link rel="stylesheet" type="text/css" media="all" 
-            href="/opac/common/js/jscalendar/calendar-brown.css" title="win2k-cold-1" />
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-en.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script>
+        <script type='text/javascript' djConfig='parseOnLoad: true,isDebug:false' src='/js/dojo/dojo/dojo.js'></script>
+        <script type='text/javascript' djConfig='parseOnLoad: true,isDebug:false' src='/js/dojo/dojo/openils_dojo.js'></script>
+        <link type='text/css' rel='stylesheet' href='/js/dojo/dojo/resources/dojo.css' />
+        <link type='text/css' rel='stylesheet' href='/js/dojo/dijit/themes/tundra/tundra.css' />
+        
+        <script type='text/javascript'>
+            dojo.require("dijit.form.DateTextBox");
+        </script>
 
         <link type='text/css' rel='stylesheet' href='admin.css'/>
 
@@ -39,7 +44,7 @@
         </style>
     </head>
 
-    <body onload='try{cdEditorInit();}catch(e){alert(js2JSON(e));}'>
+    <body onload='try{cdEditorInit();}catch(e){alert(js2JSON(e));}' class='tundra'>
 
         <div class='welcome_box'>
             <span>&staff.server.admin.closed_dates.welcome;</span><b><span id='cd_user'/></b>
                             <tbody>
                                 <tr>
                                     <td>
-                                        <input id='cd_edit_start_date' type='text' size='10' maxlength='10'/>
-                                        <img src="/opac/common/js/jscalendar/img.gif"  
-                                            id='cd_edit_start_date_img' class='cal_img'/>
+                                        <input type="text" name="cd_edit_start_date" id="cd_edit_start_date" value="now" dojoType="dijit.form.DateTextBox" />
                                     </td>
 
                                     <td>
                                     </td>
 
                                     <td>
-                                        <input id='cd_edit_end_date' type='text' size='10' maxlength='10'/>
-                                        <img src="/opac/common/js/jscalendar/img.gif"  
-                                            id='cd_edit_end_date_img' class='cal_img'/>
+                                        <input type="text" name="cd_edit_end_date" id="cd_edit_end_date" value="now" dojoType="dijit.form.DateTextBox" />
                                     </td>
 
                                     <td>
                     <tr id='cd_edit_allday_row' class='hide_me'>
                         <td>    
                             <span> &staff.server.admin.closed_dates.allday.label; </span>
-                            <input id='cd_edit_allday_start_date' type='text' size='10' maxlength='10'/>
-                            <img src="/opac/common/js/jscalendar/img.gif"  
-                                id='cd_edit_allday_start_date_img' class='cal_img'/>
+                            <input type="text" name="cd_edit_allday_start_date" id="cd_edit_allday_start_date" value="now" dojoType="dijit.form.DateTextBox" />
                         </td>
                     </tr>
         
                         <td>    
 
                             <span> All Day From </span>
-                            <input id='cd_edit_allmultiday_start_date' type='text' size='10' maxlength='10'/>
-                            <img src="/opac/common/js/jscalendar/img.gif"  
-                                id='cd_edit_allmultiday_start_date_img' class='cal_img'/>
+                            <input type="text" name="cd_edit_allmultiday_start_date" id="cd_edit_allmultiday_start_date" value="now" dojoType="dijit.form.DateTextBox" />
 
                             <span> Through</span>
-
-                            <input id='cd_edit_allmultiday_end_date' type='text' size='10' maxlength='10'/>
-                            <img src="/opac/common/js/jscalendar/img.gif"  
-                                id='cd_edit_allmultiday_end_date_img' class='cal_img'/>
+                            <input type="text" name="cd_edit_allmultiday_end_date" id="cd_edit_allmultiday_end_date" value="now" dojoType="dijit.form.DateTextBox" />
                         </td>
                     </tr>
 
index 3710dd7..db86a23 100644 (file)
             //cache_me('/xul/server/patron/ue_config.js','http');
             //cache_me('/xul/server/patron/ue_ui.js','http');
             //cache_me('/xul/server/patron/ue.js','http');
-            //cache_me('/opac/common/js//config.js','http');
+            //cache_me('/opac/common/js/config.js','http');
             //cache_me('/opac/common/js/opac_utils.js','http');
             //cache_me('/opac/common/js/init.js','http');
-            //cache_me('/opac/common/js/jscalendar/calendar-brown.css','http');
-            //cache_me('/opac/common/js/jscalendar/calendar.js','http');
-            //cache_me('/opac/common/js/jscalendar/lang/calendar-en.js','http');
-            //cache_me('/opac/common/js/jscalendar/calendar-setup.js','http');
-            //cache_me('/opac/common/js/jscalendar/img.gif','http');
 
             //cache_me('/xul/server/skin/media/images/stop_sign.png','http');
             //cache_me('/xul/server/skin/media/images/bad_barcode.png','http');
index 37b807d..bda8555 100644 (file)
 
     <head>
         <title>&ev.staff.patron.ue_xhtml.ev_user_editor.label;</title>
+        <script type='text/javascript' src='/js/dojo/dojo/dojo.js'></script>
+        <script type='text/javascript' src='/js/dojo/dojo/openils_dojo.js'></script>
+        <script type='text/javascript'>
+            dojo.require('dijit.form.DateTextBox');
+        </script>
+        
         <script language='javascript' src='/opac/common/js/utils.js'> </script>
-        <script language='javascript' src='/opac/common/js//config.js'> </script> 
+        <script language='javascript' src='/opac/common/js/config.js'> </script> 
         <script language='javascript' src='/opac/common/js/CGI.js'> </script>
     
         <script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
         <script language='javascript' src='ue_ui.js'> </script>
         <script language='javascript' src='ue.js'> </script>
         <link type='text/css' rel='stylesheet' href='../admin/admin.css'/>
-  
-        <link rel="stylesheet" type="text/css" media="all" 
-            href="/opac/common/js/jscalendar/calendar-brown.css" title="win2k-cold-1" />
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-en.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script>
 
 
         <style type='text/css'>
                                         <td><div class='wide right'>&ev.staff.patron.ue_xhtml.dob.label;</div></td>
                                         <td>
                                             <div class='wide left'>
-    
-                                                <input type='text' id='ue_dob' size='10' maxlength='10' 
-                                                    onfocus='/*$("ue_dob_trigger").onclick(event);*/'>1980-01-01</input>
-    
-                                                <button style='padding: 0px;' id='ue_dob_trigger'>
-                                                    <img src="/opac/common/js/jscalendar/img.gif" 
-                                                        style="cursor: pointer; border: 1px solid red; padding: 0px; margin: -3px;" 
-                                                        title="Date selector"
-                                                        onmouseover="this.style.background='red';" 
-                                                        onmouseout="this.style.background=''" />
-                                                </button>
-
-                                                <span class='pad' style='font-size: 8pt;'>(YYYY-MM-DD)</span>
-    
-                                                <script type="text/javascript">
-                                                    Calendar.setup({
-                                                        inputField    : "ue_dob",                // id of the input field
-                                                        ifFormat        : "%Y-%m-%d",            // format of the input field
-                                                        button        : "ue_dob_trigger",  // trigger for the calendar (button ID)
-                                                        align            : "Tl",                    // alignment (defaults to "Bl")
-                                                        singleClick    : true
-                                                    });
-                                                </script>
-    
+                                                <!--No need to worry about converting local date formats to ISO dojo is kind enough to do that for us. -->
+                                                <input type="text" name="ue_dob" id="ue_dob" value="1980-01-01" dojoType="dijit.form.DateTextBox" required="true" />
                                             </div>
                                         </td>
                                     </tr>
                                         <td><div class='wide right'>&ev.staff.patron.ue_xhtml.account_expiration_date.label;</div></td>
                                         <td>
                                             <div class='wide left'>
-                                                <input type='text' id='ue_expire' size='10' maxlength='10'/>
-    
-                                                <button style='padding: 0px;' id='ue_expire_trigger'>
-                                                    <img src="/opac/common/js/jscalendar/img.gif" 
-                                                        style="cursor: pointer; border: 1px solid red; padding: 0px; margin: -3px;" 
-                                                        title="&ev.staff.patron.ue_xhtml.date_selector.label;"
-                                                        onmouseover="this.style.background='red';" 
-                                                        onmouseout="this.style.background=''" />
-                                                </button>
-
-                                                <span class='pad' style='font-size: 8pt;'>(YYYY-MM-DD)</span>
-                                                <script type="text/javascript">
-                                                    Calendar.setup({
-                                                        inputField    : "ue_expire",                // id of the input field
-                                                        ifFormat        : "%Y-%m-%d",                // format of the input field
-                                                        button        : "ue_expire_trigger",  // trigger for the calendar (button ID)
-                                                        align            : "Tl",                        // alignment (defaults to "Bl")
-                                                        singleClick    : true
-                                                    });
-                                                </script>
+                                                <!--No need to worry about converting local date formats to ISO dojo is kind enough to do that for us. -->
+                                                <input type="text" name="ue_expire" id="ue_expire" value="now" dojoType="dijit.form.DateTextBox" required="true" />
                                             </div>
                                         </td>
                                     </tr>