View | Details | Raw Unified | Return to bug 14060
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +3 lines)
Lines 9-14 if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug Link Here
9
var MSG_PLEASE_ENTER_A_VALID_DATE = _("Please enter a valid date (should match %s).");
9
var MSG_PLEASE_ENTER_A_VALID_DATE = _("Please enter a valid date (should match %s).");
10
10
11
function is_valid_date(date) {
11
function is_valid_date(date) {
12
    // An empty string is considered as a valid date for convenient reasons.
13
    if ( date === '' ) return 1;
14
12
    var dateformat = dateformat_str = '[% Koha.Preference('dateformat') %]';
15
    var dateformat = dateformat_str = '[% Koha.Preference('dateformat') %]';
13
    if ( dateformat == 'us' ) {
16
    if ( dateformat == 'us' ) {
14
        if ( date.search(/\d{2}\/\d{2}\/\d{4}/) == -1 ) return 0;
17
        if ( date.search(/\d{2}\/\d{2}\/\d{4}/) == -1 ) return 0;
15
- 

Return to bug 14060