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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc (-1 / +22 lines)
Lines 157-162 Link Here
157
        }
157
        }
158
    }
158
    }
159
159
160
    function Date_from_syspref(dstring) {
161
        var dateX = dstring.split(/[-/.]/);
162
        if (debug > 1 && sentmsg < 1) {
163
            sentmsg++;
164
            alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));
165
        }
166
        if (dateformat_pref === "iso") {
167
            return new Date(dateX[0], (dateX[1] - 1), dateX[2]); // YYYY-MM-DD to (YYYY,m(0-11),d)
168
        } else if (dateformat_pref === "us") {
169
            return new Date(dateX[2], (dateX[0] - 1), dateX[1]); // MM/DD/YYYY to (YYYY,m(0-11),d)
170
        } else if (dateformat_pref === "metric") {
171
            return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD/MM/YYYY to (YYYY,m(0-11),d)
172
        } else if (dateformat_pref === "dmydot") {
173
            return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD.MM.YYYY to (YYYY,m(0-11),d)
174
        } else {
175
            if (debug > 0) {
176
                alert("KOHA ERROR - Unrecognized date format: " + dateformat_pref);
177
            }
178
            return 0;
179
        }
180
    }
181
160
        $(document).ready(function(){
182
        $(document).ready(function(){
161
            $(".flatpickr").each(function(){
183
            $(".flatpickr").each(function(){
162
                let options = {};
184
                let options = {};
163
- 

Return to bug 36341