For the record, this change does fix the problem. THANKS! I do like the jQuery calendar though because it has features such as the Today button and the month/year menus.
Calven > On May 17, 2017, at 9:55 PM, Michael Sharp <mich...@getsharp.org> wrote: > > Perhaps calendar.js should use Date.normalizeFormat instead of the string > replacements currently in string_to_date > > Replacing the following lines: > > dateOrder = dateOrder.replace(/%A/,''); > dateOrder = dateOrder.replace(/%[ed]/,'d'); > dateOrder = dateOrder.replace(/%[mbB]/,'M'); > dateOrder = dateOrder.replace(/%[yY]/,'yyyy'); > > with > > dateOrder = Date.normalizeFormat(dateOrder); > > Seems to do the job with a range of format patterns I’ve thrown at it so far. > > Sharpy.. > > >> On 17 May 2017, at 1:05 am, Calven Eggert <cal...@mac.com >> <mailto:cal...@mac.com>> wrote: >> >> Anyone familiar with the AjaxDatePicker? >> >> I’ve narrowed down my problem to the following line in the calendar.js file >> in the function string_to_date: >> var result = Date.parseExact(s, [dateOrder]); >> >> The parsing of the date doesn’t work properly with some formats (even the >> default one) it returns null and therefore, uses the current date. It used >> to, and the AjaxExample here >> (http://webobjects.mdimension.com/cgi-bin/WebObjects/AjaxExample.woa/1/wo/VrPvtPdTQHbyR0L5j9srB0/2.0.69 >> >> <http://webobjects.mdimension.com/cgi-bin/WebObjects/AjaxExample.woa/1/wo/VrPvtPdTQHbyR0L5j9srB0/2.0.69>) >> works fine. >> >> >> Any suggestions? Anyone using a different calendar popup window? >> >> >> >>> Begin forwarded message: >>> >>> From: Calven Eggert <cal...@mac.com <mailto:cal...@mac.com>> >>> Subject: AjaxDatePicker - can't use b || B >>> Date: May 15, 2017 at 2:05:00 PM EDT >>> To: WebObjects-Dev <webobjects-dev@lists.apple.com >>> <mailto:webobjects-dev@lists.apple.com>> >>> >>> Hi, All >>> >>> The AjaxDatePicker with the month format of %b doesn’t work for me. (%B >>> doesn’t work either. It does work with %m) >>> >>> Using %b, it displays properly in the field (For example: 14-Jan-2017) >>> however, when you click on the field to display the calendar, instead of >>> showing my January month it shows the current date (May 15). >>> >>> Does someone else use the %b or %B format successfully? >>> >>> Calven >>> >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com >> <mailto:Webobjects-dev@lists.apple.com>) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com >> <https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com> >> >> This email sent to getsh...@gmail.com >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com