Bug 4144 - CheckDate() does not pay attention to date format
Summary: CheckDate() does not pay attention to date format
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: PC All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL: koha-tmpl/intranet-tmpl/prog/en/js/ac...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-09 01:42 UTC by Galen Charlton
Modified: 2015-06-04 23:23 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
screenshot of 'new contract' (15.20 KB, image/png)
2011-10-29 13:28 UTC, Katrin Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
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.