Bug 4144

Summary: CheckDate() does not pay attention to date format
Product: Koha Reporter: Galen Charlton <gmcharlt>
Component: AcquisitionsAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: indradg, katrin.fischer
Version: Main   
Hardware: PC   
OS: All   
URL: koha-tmpl/intranet-tmpl/prog/en/js/acq.js
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: screenshot of 'new contract'

Description Chris Cormack 2010-05-21 01:23:39 UTC


---- Reported by gmcharlt@gmail.com 2010-02-09 13:42:47 ----

The CheckDate() function in koha-tmpl/intranet-tmpl/prog/en/js/acq.js expects dates to be in DD/MM/YYYY, thereby ignoring the dateformat preference.  This breaks date validation in, e.g., aqcontract.tmpl for any dateformat other than DD/MM/YYYY.  A better date validation routine is needed.



---- Additional Comments From gmcharlt@gmail.com 2010-02-09 13:45:32 ----

CheckDate() in acq.js appears to be a copy-and-paste from  koha-tmpl/intranet-tmpl/prog/en/js/members.js



---- Additional Comments From gmcharlt@gmail.com 2010-02-10 13:39:17 ----

Submitted patch to replace the date validation routines in acq.js.  CheckDate in circ.js should either be removed or rewritten so that it uses Date_from_syspref as well.



---- Additional Comments From gmcharlt@gmail.com 2010-02-10 13:43:13 ----

Pushed acq.js patch.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:23 UTC  ---

This bug was previously known as _bug_ 4144 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4144
This bug blocked bug(s) 3912.

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Katrin Fischer 2011-10-29 13:28:21 UTC
Created attachment 6112 [details]
screenshot of 'new contract'

There is still a problem with the calendar when dateformat is set to YYYY/MM/DD.
The form complains that start date is before end date for dates shown on screenshot.
Comment 2 Katrin Fischer 2014-07-12 10:15:31 UTC
Retested on current master, no problems found.