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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (+3 lines)
Lines 34-39 Link Here
34
            if( $(instance.input).hasClass("futuredate") ){
34
            if( $(instance.input).hasClass("futuredate") ){
35
                instance.set("minDate", new Date().fp_incr(1));
35
                instance.set("minDate", new Date().fp_incr(1));
36
            }
36
            }
37
            if( $(instance.input).hasClass("pastdate") ){
38
                instance.set("maxDate", new Date().fp_incr(-1));
39
            }
37
            $(instance.input)
40
            $(instance.input)
38
                /* Add a wrapper element so that we can prevent the clear button from wrapping */
41
                /* Add a wrapper element so that we can prevent the clear button from wrapping */
39
                .wrap("<span class='flatpickr_wrapper'></span>")
42
                .wrap("<span class='flatpickr_wrapper'></span>")
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt (-33 / +31 lines)
Lines 119-129 Link Here
119
                <td>Placed on</td>
119
                <td>Placed on</td>
120
				<td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
120
				<td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
121
				<td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td>
121
				<td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td>
122
				<td> From <input type="text" size="10" id="from" name="Filter" value="" />
122
                <td>
123
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
123
                    From <input type="text" size="10" id="placedonfrom" name="Filter" value="" />
124
					To <input size="10" id="to" name="Filter" type="text" value="" />
124
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
125
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
125
                    To <input size="10" id="placedonto" name="Filter" type="text" value="" />
126
				</td>
126
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
127
                </td>
127
			</tr>
128
			</tr>
128
			<tr class="hilighted">
129
			<tr class="hilighted">
129
				<td>&nbsp;</td>
130
				<td>&nbsp;</td>
Lines 141-151 Link Here
141
                <td>Received on</td>
142
                <td>Received on</td>
142
				<td><input type="radio" name="Line" value="aqorders.datereceived" /></td>
143
				<td><input type="radio" name="Line" value="aqorders.datereceived" /></td>
143
				<td><input type="radio" name="Column" value="aqorders.datereceived" /></td>
144
				<td><input type="radio" name="Column" value="aqorders.datereceived" /></td>
144
				<td> From <input type="text" size="10" id="fromRO" name="Filter" value="" />
145
                <td>
145
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
146
                    From <input type="text" size="10" id="receivedonfrom" name="Filter" value="" />
146
					To <input type="text" size="10" id="toRO" name="Filter" value="" />
147
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
147
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
148
                    To <input type="text" size="10" id="receivedonto" name="Filter" value="" />
148
				</td>
149
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
150
                </td>
149
			</tr>
151
			</tr>
150
			<tr>
152
			<tr>
151
				<td>&nbsp;</td>
153
				<td>&nbsp;</td>
Lines 339-371 Link Here
339
    [% INCLUDE 'calendar.inc' %]
341
    [% INCLUDE 'calendar.inc' %]
340
    <script>
342
    <script>
341
        $(document).ready(function() {
343
        $(document).ready(function() {
342
            // http://jqueryui.com/demos/datepicker/#date-range
344
            var placedonfrom = $("#placedonfrom").flatpickr({
343
            var dates = $( "#from, #to" ).datepicker({
345
                onClose: function( selectedDates, dateText, instance) {
344
                changeMonth: true,
346
                    validate_date( selectedDates, instance );
345
                numberOfMonths: 1,
347
                    placedonto.set('minDate', selectedDates[0]);
346
                onSelect: function( selectedDate ) {
347
                    var option = this.id == "from" ? "minDate" : "maxDate",
348
                        instance = $( this ).data( "datepicker" );
349
                        date = $.datepicker.parseDate(
350
                            instance.settings.dateFormat ||
351
                            $.datepicker._defaults.dateFormat,
352
                            selectedDate, instance.settings );
353
                    dates.not( this ).datepicker( "option", option, date );
354
                }
348
                }
355
            });
349
            });
356
            var datesRO = $( "#fromRO, #toRO" ).datepicker({
350
            var placedonto = $("#placedonto").flatpickr({
357
                changeMonth: true,
351
                onClose: function( selectedDates, dateText, instance) {
358
                numberOfMonths: 1,
352
                    validate_date( selectedDates, instance );
359
                onSelect: function( selectedDate ) {
353
                },
360
                    var option = this.id == "fromRO" ? "minDate" : "maxDate",
354
            });
361
                        instance = $( this ).data( "datepicker" );
355
362
                        date = $.datepicker.parseDate(
356
            var receivedonfrom = $("#receivedonfrom").flatpickr({
363
                            instance.settings.dateFormat ||
357
                onClose: function( selectedDates, dateText, instance) {
364
                            $.datepicker._defaults.dateFormat,
358
                    validate_date( selectedDates, instance );
365
                            selectedDate, instance.settings );
359
                    receivedonto.set('minDate', selectedDates[0]);
366
                    datesRO.not( this ).datepicker( "option", option, date );
367
                }
360
                }
368
            });
361
            });
362
            var receivedonto = $("#receivedonto").flatpickr({
363
                onClose: function( selectedDates, dateText, instance) {
364
                    validate_date( selectedDates, instance );
365
                },
366
            });
369
        });
367
        });
370
    </script>
368
    </script>
371
[% END %]
369
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt (-29 / +34 lines)
Lines 117-128 Link Here
117
    <h1>Patrons with the most checkouts</h1>
117
    <h1>Patrons with the most checkouts</h1>
118
	<form method="post" action="/cgi-bin/koha/reports/bor_issues_top.pl">
118
	<form method="post" action="/cgi-bin/koha/reports/bor_issues_top.pl">
119
	<fieldset class="rows">
119
	<fieldset class="rows">
120
	<ol><li><label for="from">Checkout date from:</label> <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
120
        <ol>
121
					<label class="inline" for="to">To: </label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
121
            <li>
122
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
122
                <label for="checkoutfrom">Checkout date from:</label>
123
				<li> <label for="fromRO">Check-in date from:</label> <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
123
                <input type="text" size="10" id="checkoutfrom" name="Filter" />
124
					<label class="inline" for="toRO">To: </label> <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
124
                <label class="inline" for="checkoutto">To: </label>
125
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
125
                <input size="10" id="checkoutto" name="Filter" value="" type="text" />
126
                <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
127
            </li>
128
            <li>
129
                <label for="checkinfrom">Check-in date from:</label>
130
                <input type="text" size="10" id="checkinfrom" name="Filter" />
131
                <label class="inline" for="checkinto">To: </label>
132
                <input type="text" size="10" id="checkinto" name="Filter" value="" />
133
                <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
134
            </li>
126
			<li> 
135
			<li> 
127
				<label for="branch">Library: </label>
136
				<label for="branch">Library: </label>
128
<select name="Filter" id="branch"><option value="" > Any library</option>
137
<select name="Filter" id="branch"><option value="" > Any library</option>
Lines 220-252 Link Here
220
    [% INCLUDE 'calendar.inc' %]
229
    [% INCLUDE 'calendar.inc' %]
221
    <script>
230
    <script>
222
        $(document).ready(function() {
231
        $(document).ready(function() {
223
            // http://jqueryui.com/demos/datepicker/#date-range
232
            var checkoutfrom = $("#checkoutfrom").flatpickr({
224
            var dates = $( "#from, #to" ).datepicker({
233
                onClose: function( selectedDates, dateText, instance) {
225
                changeMonth: true,
234
                    validate_date( selectedDates, instance );
226
                numberOfMonths: 1,
235
                    checkoutto.set('minDate', selectedDates[0]);
227
                onSelect: function( selectedDate ) {
228
                    var option = this.id == "from" ? "minDate" : "maxDate",
229
                        instance = $( this ).data( "datepicker" );
230
                        date = $.datepicker.parseDate(
231
                            instance.settings.dateFormat ||
232
                            $.datepicker._defaults.dateFormat,
233
                            selectedDate, instance.settings );
234
                    dates.not( this ).datepicker( "option", option, date );
235
                }
236
                }
236
            });
237
            });
237
            var datesRO = $( "#fromRO, #toRO" ).datepicker({
238
            var checkoutto = $("#checkoutto").flatpickr({
238
                changeMonth: true,
239
                onClose: function( selectedDates, dateText, instance) {
239
                numberOfMonths: 1,
240
                    validate_date( selectedDates, instance );
240
                onSelect: function( selectedDate ) {
241
                },
241
                    var option = this.id == "fromRO" ? "minDate" : "maxDate",
242
            });
242
                        instance = $( this ).data( "datepicker" );
243
243
                        date = $.datepicker.parseDate(
244
            var checkinfrom = $("#checkinfrom").flatpickr({
244
                            instance.settings.dateFormat ||
245
                onClose: function( selectedDates, dateText, instance) {
245
                            $.datepicker._defaults.dateFormat,
246
                    validate_date( selectedDates, instance );
246
                            selectedDate, instance.settings );
247
                    checkinto.set('minDate', selectedDates[0]);
247
                    datesRO.not( this ).datepicker( "option", option, date );
248
                }
248
                }
249
            });
249
            });
250
            var checkinto = $("#checkinto").flatpickr({
251
                onClose: function( selectedDates, dateText, instance) {
252
                    validate_date( selectedDates, instance );
253
                },
254
            });
250
        });
255
        });
251
    </script>
256
    </script>
252
[% END %]
257
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt (-6 / +1 lines)
Lines 68-74 Link Here
68
    [% END %]
68
    [% END %]
69
    </select>
69
    </select>
70
</li>
70
</li>
71
    <li><label for="to">Not checked out since: </label> <input size="10" id="to" name="Filter" value="" type="text" />
71
    <li><label for="to">Not checked out since: </label> <input size="10" id="to" class="flatpickr pastdate" name="Filter" value="" type="text" />
72
</li>
72
</li>
73
		</ol>
73
		</ol>
74
	</fieldset>
74
	</fieldset>
Lines 143-153 Link Here
143
143
144
[% MACRO jsinclude BLOCK %]
144
[% MACRO jsinclude BLOCK %]
145
    [% INCLUDE 'calendar.inc' %]
145
    [% INCLUDE 'calendar.inc' %]
146
    <script>
147
        $(document).ready(function(){
148
            $("#to").datepicker({ maxDate: "-1D" });
149
        });
150
    </script>
151
[% END %]
146
[% END %]
152
147
153
[% INCLUDE 'intranet-bottom.inc' %]
148
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt (-2 / +2 lines)
Lines 58-69 Link Here
58
                <br>
58
                <br>
59
                <li>
59
                <li>
60
                    <label for="from">From: </label>
60
                    <label for="from">From: </label>
61
                    <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="datepickerfrom" />
61
                    <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="flatpickrfrom" />
62
                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
62
                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
63
                </li>
63
                </li>
64
                <li>
64
                <li>
65
                    <label for="to">To: </label>
65
                    <label for="to">To: </label>
66
                    <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="datepickerto" />
66
                    <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="flatpickrto" />
67
                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
67
                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
68
                </li>
68
                </li>
69
69
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt (-29 / +33 lines)
Lines 95-106 Link Here
95
	<form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
95
	<form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
96
	<fieldset class="rows">
96
	<fieldset class="rows">
97
	<ol>
97
	<ol>
98
        <li><label for="from">Checkout date from: </label> <input type="text" size="10" id="from" name="Filter" />
98
        <li>
99
        <label for="to" class="inline">To:</label> <input size="10" id="to" name="Filter" value="" type="text" />
99
            <label for="checkoutfrom">Checkout date from: </label>
100
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
100
            <input type="text" size="10" id="checkoutfrom" name="Filter" />
101
        <li><label for="fromRO">Check-in date from</label> <input type="text" size="10" id="fromRO" name="Filter" />
101
            <label for="checkoutto" class="inline">To:</label>
102
        <label for="toRO" class="inline">To: </label> <input type="text" size="10" id="toRO" name="Filter" value="" />
102
            <input size="10" id="checkoutto" name="Filter" value="" type="text" />
103
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
103
            <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
104
        </li>
105
        <li>
106
            <label for="checkinfrom">Check-in date from</label>
107
            <input type="text" size="10" id="checkinfrom" name="Filter" />
108
            <label for="checkinto" class="inline">To: </label>
109
            <input type="text" size="10" id="checkinto" name="Filter" value="" />
110
            <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
111
        </li>
104
        <li>
112
        <li>
105
            <label for="branch">Library: </label>
113
            <label for="branch">Library: </label>
106
            <select name="Filter" id="branch"><option value="" > Any library</option>
114
            <select name="Filter" id="branch"><option value="" > Any library</option>
Lines 220-252 Link Here
220
    <script>
228
    <script>
221
        [% UNLESS ( do_it ) %]
229
        [% UNLESS ( do_it ) %]
222
            $(document).ready(function() {
230
            $(document).ready(function() {
223
                // http://jqueryui.com/demos/datepicker/#date-range
231
                var checkoutfrom = $("#checkoutfrom").flatpickr({
224
                var dates = $( "#from, #to" ).datepicker({
232
                    onClose: function( selectedDates, dateText, instance) {
225
                    changeMonth: true,
233
                        validate_date( selectedDates, instance );
226
                    numberOfMonths: 1,
234
                        checkoutto.set('minDate', selectedDates[0]);
227
                    onSelect: function( selectedDate ) {
228
                        var option = this.id == "from" ? "minDate" : "maxDate",
229
                            instance = $( this ).data( "datepicker" );
230
                            date = $.datepicker.parseDate(
231
                                instance.settings.dateFormat ||
232
                                $.datepicker._defaults.dateFormat,
233
                                selectedDate, instance.settings );
234
                        dates.not( this ).datepicker( "option", option, date );
235
                    }
235
                    }
236
                });
236
                });
237
                var datesRO = $( "#fromRO, #toRO" ).datepicker({
237
                var checkoutto = $("#checkoutto").flatpickr({
238
                    changeMonth: true,
238
                    onClose: function( selectedDates, dateText, instance) {
239
                    numberOfMonths: 1,
239
                        validate_date( selectedDates, instance );
240
                    onSelect: function( selectedDate ) {
240
                    },
241
                        var option = this.id == "fromRO" ? "minDate" : "maxDate",
241
                });
242
                            instance = $( this ).data( "datepicker" );
242
243
                            date = $.datepicker.parseDate(
243
                var checkinfrom = $("#checkinfrom").flatpickr({
244
                                instance.settings.dateFormat ||
244
                    onClose: function( selectedDates, dateText, instance) {
245
                                $.datepicker._defaults.dateFormat,
245
                        validate_date( selectedDates, instance );
246
                                selectedDate, instance.settings );
246
                        checkinto.set('minDate', selectedDates[0]);
247
                        datesRO.not( this ).datepicker( "option", option, date );
248
                    }
247
                    }
249
                });
248
                });
249
                var checkinto = $("#checkinto").flatpickr({
250
                    onClose: function( selectedDates, dateText, instance) {
251
                        validate_date( selectedDates, instance );
252
                    },
253
                });
250
            });
254
            });
251
        [% END %]
255
        [% END %]
252
    </script>
256
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt (-14 / +28 lines)
Lines 252-260 Link Here
252
                <td><input type="radio" name="Column" value="items.dateaccessioned" /></td>
252
                <td><input type="radio" name="Column" value="items.dateaccessioned" /></td>
253
                <td>
253
                <td>
254
                    <label for="acqdateFrom">From</label>
254
                    <label for="acqdateFrom">From</label>
255
                    <input type="text" name="Filter" id="acqdateFrom" class="datepicker" />
255
                    <input type="text" name="Filter" id="acqdateFrom" />
256
                    <label for="acqdateTo">To</label>
256
                    <label for="acqdateTo">To</label>
257
                    <input type="text" name="Filter" id="acqdateTo" class="datepicker" />
257
                    <input type="text" name="Filter" id="acqdateTo" />
258
                </td>
258
                </td>
259
            </tr>
259
            </tr>
260
            <tr id="removeddatetr">
260
            <tr id="removeddatetr">
Lines 263-271 Link Here
263
                <td><input type="radio" name="Column" value="deleteditems.timestamp" /></td>
263
                <td><input type="radio" name="Column" value="deleteditems.timestamp" /></td>
264
                <td>
264
                <td>
265
                    <label for="deldateFrom">From</label>
265
                    <label for="deldateFrom">From</label>
266
                    <input type="text" name="Filter" id="deldateFrom" class="datepicker" />
266
                    <input type="text" name="Filter" id="deldateFrom" />
267
                    <label for="deldateTo">To</label>
267
                    <label for="deldateTo">To</label>
268
                    <input type="text" name="Filter" id="deldateTo" class="datepicker"/>
268
                    <input type="text" name="Filter" id="deldateTo" />
269
                </td>
269
                </td>
270
            </tr>
270
            </tr>
271
		</tbody>
271
		</tbody>
Lines 353-368 Link Here
353
        }
353
        }
354
354
355
        $(document).ready(function() {
355
        $(document).ready(function() {
356
            $('#acqdateFrom, #deldateFrom')
356
357
              .datepicker('option', 'onSelect', function(selectedDate) {
357
            var acqdateFrom = $("#acqdateFrom").flatpickr({
358
                var id = $(this).attr('id').replace('From', 'To');
358
                onClose: function( selectedDates, dateText, instance) {
359
                $('#' + id).datepicker('option', 'minDate', selectedDate);
359
                    validate_date( selectedDates, instance );
360
              });
360
                    acqdateTo.set('minDate', selectedDates[0]);
361
            $('#acqdateTo, #deldateTo')
361
                }
362
              .datepicker('option', 'onSelect', function(selectedDate) {
362
            });
363
                var id = $(this).attr('id').replace('To', 'From');
363
            var acqdateTo = $("#acqdateTo").flatpickr({
364
                $('#' + id).datepicker('option', 'maxDate', selectedDate);
364
                onClose: function( selectedDates, dateText, instance) {
365
              });
365
                    validate_date( selectedDates, instance );
366
                },
367
            });
368
369
            var deldateFrom = $("#deldateFrom").flatpickr({
370
                onClose: function( selectedDates, dateText, instance) {
371
                    validate_date( selectedDates, instance );
372
                    deldateTo.set('minDate', selectedDates[0]);
373
                }
374
            });
375
            var deldateTo = $("#deldateTo").flatpickr({
376
                onClose: function( selectedDates, dateText, instance) {
377
                    validate_date( selectedDates, instance );
378
                },
379
            });
366
380
367
            $("input[name='Cellvalue']").change(function() {
381
            $("input[name='Cellvalue']").change(function() {
368
                changeRemovedDateTrStatus();
382
                changeRemovedDateTrStatus();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt (-2 / +2 lines)
Lines 259-268 Link Here
259
    </li>
259
    </li>
260
    <li class="radio">
260
    <li class="radio">
261
        Start of date range
261
        Start of date range
262
        <input type="text" size="10" id="from" name="[% column.name | html %]_start_value" value="" class="datepickerfrom" />
262
        <input type="text" size="10" id="from" name="[% column.name | html %]_start_value" value="" class="flatpickrfrom" />
263
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
263
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
264
        End of date range
264
        End of date range
265
        <input type="text" size="10" id="to" name="[% column.name | html %]_end_value" value="" class="datepickerto" />
265
        <input type="text" size="10" id="to" name="[% column.name | html %]_end_value" value="" class="flatpickrto" />
266
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
266
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
267
    </li>
267
    </li>
268
[% END %]
268
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-5 / +22 lines)
Lines 603-609 Link Here
603
                                        </td>
603
                                        </td>
604
                                        [% IF ( criteri.date ) %]
604
                                        [% IF ( criteri.date ) %]
605
                                            <td>
605
                                            <td>
606
                                                <input type="text" size="10" id="[% criteri.name | html %]_value" name="[% criteri.name | html %]_value" value="" class="datepicker" />
606
                                                <input type="text" size="10" id="[% criteri.name | html %]_value" name="[% criteri.name | html %]_value" value="" class="flatpickr" />
607
                                                <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
607
                                                <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
608
                                            </td>
608
                                            </td>
609
                                        </tr>
609
                                        </tr>
Lines 619-627 Link Here
619
                                                [% IF ( criteri.daterange ) %]
619
                                                [% IF ( criteri.daterange ) %]
620
                                                    <td>
620
                                                    <td>
621
                                                        from
621
                                                        from
622
                                                        <input type="text" size="10" id="from_[% criteri.name | html %]_value" name="from_[% criteri.name | html %]_value" value="" class="datepickerfrom" />
622
                                                        <input type="text" size="10" id="from_[% criteri.name.remove('\.') | html %]_value" name="from_[% criteri.name | html %]_value" value="" />
623
                                                        to
623
                                                        to
624
                                                        <input type="text" size="10" id="to_[% criteri.name | html %]_value" name="to_[% criteri.name | html %]_value" value="" class="datepickerto" />
624
                                                        <input type="text" size="10" id="to_[% criteri.name.remove('\.') | html %]_value" name="to_[% criteri.name | html %]_value" value="" />
625
                                                        <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
625
                                                        <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
626
                                                    </td>
626
                                                    </td>
627
                                                </tr>
627
                                                </tr>
Lines 858-864 Link Here
858
                                        <input name="param_name" value="[% sql_param.name | html %]" type="hidden" />
858
                                        <input name="param_name" value="[% sql_param.name | html %]" type="hidden" />
859
                                        [% IF sql_param.input == 'date' %]
859
                                        [% IF sql_param.input == 'date' %]
860
                                            <li>
860
                                            <li>
861
                                                <label for="date_[% sql_param_entry | html %][% loop.count | html %]">[% sql_param.entry | html %]:</label> <input id="date_[% sql_param_entry | html %][% loop.count | html %]" type="text" value="" size="10" name="sql_params" class="datepicker" />
861
                                                <label for="date_[% sql_param_entry | html %][% loop.count | html %]">[% sql_param.entry | html %]:</label> <input id="date_[% sql_param_entry | html %][% loop.count | html %]" type="text" value="" size="10" name="sql_params" class="flatpickr" />
862
                                            </li>
862
                                            </li>
863
                                        [% ELSIF ( sql_param.input == 'text' ) %]
863
                                        [% ELSIF ( sql_param.input == 'text' ) %]
864
                                            <li>
864
                                            <li>
Lines 1320-1326 Link Here
1320
                                <ol>
1320
                                <ol>
1321
                                    <li>
1321
                                    <li>
1322
                                        <label for="filter_date">Date:</label>
1322
                                        <label for="filter_date">Date:</label>
1323
                                        <input type="text" id="filter_date" name="filter_date" size="10" value="[% filters.date | html %]" class="datepicker" />
1323
                                        <input type="text" id="filter_date" name="filter_date" size="10" value="[% filters.date | html %]" class="flatpickr" />
1324
                                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1324
                                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1325
                                    </li>
1325
                                    </li>
1326
                                    <li>
1326
                                    <li>
Lines 2189-2194 Link Here
2189
                readOnly: true
2189
                readOnly: true
2190
            });
2190
            });
2191
        }
2191
        }
2192
        [% IF ( build4 ) %]
2193
            [% FOREACH criteri IN criteria %]
2194
                [% IF ( criteri.daterange ) %]
2195
                    var from_[% criteri.name.remove('\.') | html %]_value = $("#from_[% criteri.name.remove('\.') | html %]_value").flatpickr({
2196
                        onClose: function( selectedDates, dateText, instance) {
2197
                            validate_date( selectedDates, instance );
2198
                            to_[% criteri.name.remove('\.') | html %]_value.set('minDate', selectedDates[0]);
2199
                        }
2200
                    });
2201
                    var to_[% criteri.name.remove('\.') | html %]_value = $("#to_[% criteri.name.remove('\.') | html %]_value").flatpickr({
2202
                        onClose: function( selectedDates, dateText, instance) {
2203
                            validate_date( selectedDates, instance );
2204
                        },
2205
                    });
2206
                [% END %]
2207
            [% END %]
2208
        [% END %]
2192
    </script>
2209
    </script>
2193
[% END %]
2210
[% END %]
2194
2211
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt (-27 / +29 lines)
Lines 103-110 Link Here
103
				<td>Checkout date</td>
103
				<td>Checkout date</td>
104
				<td><input type="radio" name="Line" value="timestamp" /></td>
104
				<td><input type="radio" name="Line" value="timestamp" /></td>
105
                <td><input type="radio" checked="checked" name="Column" value="timestamp" /></td>
105
                <td><input type="radio" checked="checked" name="Column" value="timestamp" /></td>
106
				<td > <label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
106
                <td>
107
					<label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
107
                    <label for="checkoutfrom">From</label>
108
                    <input type="text" size="10" id="checkoutfrom" name="Filter" />
109
                    <label for="checkouto">To</label>
110
                    <input size="10" id="checkouto" name="Filter" value="" type="text" />
108
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
111
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
109
				</td>
112
				</td>
110
			</tr>
113
			</tr>
Lines 124-131 Link Here
124
				<td>Returns</td>
127
				<td>Returns</td>
125
				<td><input type="radio" name="Line" value="returndate" /></td>
128
				<td><input type="radio" name="Line" value="returndate" /></td>
126
				<td><input type="radio" name="Column" value="returndate" /></td>
129
				<td><input type="radio" name="Column" value="returndate" /></td>
127
				<td > <label for="fromRO">From</label> <input type="text" size="10" id="fromRO" name="Filter" />
130
                <td>
128
					<label for="toRO">To</label> <input type="text" size="10" id="toRO" name="Filter" value="" />
131
                    <label for="checkinfrom">From</label>
132
                    <input type="text" size="10" id="checkinfrom" name="Filter" />
133
                    <label for="checkinto">To</label>
134
                    <input type="text" size="10" id="checkinto" name="Filter" value="" />
129
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
135
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
130
				</td>
136
				</td>
131
			</tr>
137
			</tr>
Lines 262-294 Link Here
262
    [% INCLUDE 'calendar.inc' %]
268
    [% INCLUDE 'calendar.inc' %]
263
    <script>
269
    <script>
264
        $(document).ready(function() {
270
        $(document).ready(function() {
265
            // http://jqueryui.com/demos/datepicker/#date-range
271
            var checkoutfrom = $("#checkoutfrom").flatpickr({
266
            var dates = $( "#from, #to" ).datepicker({
272
                onClose: function( selectedDates, dateText, instance) {
267
                changeMonth: true,
273
                    validate_date( selectedDates, instance );
268
                numberOfMonths: 1,
274
                    checkouto.set('minDate', selectedDates[0]);
269
                onSelect: function( selectedDate ) {
270
                    var option = this.id == "from" ? "minDate" : "maxDate",
271
                        instance = $( this ).data( "datepicker" );
272
                        date = $.datepicker.parseDate(
273
                            instance.settings.dateFormat ||
274
                            $.datepicker._defaults.dateFormat,
275
                            selectedDate, instance.settings );
276
                    dates.not( this ).datepicker( "option", option, date );
277
                }
275
                }
278
            });
276
            });
279
            var datesRO = $( "#fromRO, #toRO" ).datepicker({
277
            var checkouto = $("#checkouto").flatpickr({
280
                changeMonth: true,
278
                onClose: function( selectedDates, dateText, instance) {
281
                numberOfMonths: 1,
279
                    validate_date( selectedDates, instance );
282
                onSelect: function( selectedDate ) {
280
                },
283
                    var option = this.id == "fromRO" ? "minDate" : "maxDate",
281
            });
284
                        instance = $( this ).data( "datepicker" );
282
285
                        date = $.datepicker.parseDate(
283
            var checkinfrom = $("#checkinfrom").flatpickr({
286
                            instance.settings.dateFormat ||
284
                onClose: function( selectedDates, dateText, instance) {
287
                            $.datepicker._defaults.dateFormat,
285
                    validate_date( selectedDates, instance );
288
                            selectedDate, instance.settings );
286
                    checkinto.set('minDate', selectedDates[0]);
289
                    datesRO.not( this ).datepicker( "option", option, date );
290
                }
287
                }
291
            });
288
            });
289
            var checkinto = $("#checkinto").flatpickr({
290
                onClose: function( selectedDates, dateText, instance) {
291
                    validate_date( selectedDates, instance );
292
                },
293
            });
292
        });
294
        });
293
    </script>
295
    </script>
294
[% END %]
296
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt (-4 / +7 lines)
Lines 126-136 Link Here
126
                <td>Period</td>
126
                <td>Period</td>
127
                <td><input type="radio" name="Line" value="datetime" /></td>
127
                <td><input type="radio" name="Line" value="datetime" /></td>
128
                <td><input type="radio" name="Column" value="datetime" /></td>
128
                <td><input type="radio" name="Column" value="datetime" /></td>
129
                <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" class="datepickerfrom" />
129
                <td>
130
                    <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" class="datepickerto" />
130
                    <label for="from">From</label>
131
                    <input type="text" size="10" id="from" name="Filter" class="flatpickrfrom" />
132
                    <label for="to">To</label>
133
                    <input size="10" id="to" name="Filter" value="" type="text" class="flatpickrto" />
131
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
134
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
132
                    </td>
135
                </td>
133
                </tr>
136
            </tr>
134
            <tr>
137
            <tr>
135
                <td><label for="PeriodTypeSel">Type:</label><select name="PeriodTypeSel" id="PeriodTypeSel">
138
                <td><label for="PeriodTypeSel">Type:</label><select name="PeriodTypeSel" id="PeriodTypeSel">
136
                    <option value ="issue">Checkout</option>
139
                    <option value ="issue">Checkout</option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt (-73 / +80 lines)
Lines 123-163 Link Here
123
                <td>Hold date</td>
123
                <td>Hold date</td>
124
                <td><input type="radio" name="Line" value="reservedate" /></td>
124
                <td><input type="radio" name="Line" value="reservedate" /></td>
125
                <td><input type="radio" name="Column" value="reservedate" /></td>
125
                <td><input type="radio" name="Column" value="reservedate" /></td>
126
                <td><label for="filter_reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
126
                <td>
127
                    <label for="filter_reservedate_end">To</label> <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" />
127
                    <label for="filter_reservedate_begin">From</label>
128
                    </td>
128
                    <input type="text" size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
129
                </tr>
129
                    <label for="filter_reservedate_end">To</label>
130
                    <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" />
131
                </td>
132
            </tr>
130
            <tr>
133
            <tr>
131
                <td>Notification date</td>
134
                <td>Notification date</td>
132
                <td><input type="radio" name="Line" value="notificationdate" /></td>
135
                <td><input type="radio" name="Line" value="notificationdate" /></td>
133
                <td><input type="radio" name="Column" value="notificationdate" /></td>
136
                <td><input type="radio" name="Column" value="notificationdate" /></td>
134
                <td><label for="filter_notificationdate_begin">From</label> <input type="text"  size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" />
137
                <td>
135
                    <label for="filter_notificationdate_end">To</label> <input  size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" />
138
                    <label for="filter_notificationdate_begin">From</label>
136
                    </td>
139
                    <input type="text" size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" />
140
                    <label for="filter_notificationdate_end">To</label>
141
                    <input  size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" />
142
                </td>
137
             </tr>
143
             </tr>
138
            <tr>
144
            <tr>
139
                <td>Reminder date</td>
145
                <td>Reminder date</td>
140
                <td><input type="radio" name="Line" value="reminderdate" /></td>
146
                <td><input type="radio" name="Line" value="reminderdate" /></td>
141
                <td><input type="radio" name="Column" value="reminderdate" /></td>
147
                <td><input type="radio" name="Column" value="reminderdate" /></td>
142
                <td><label for="filter_reminderdate_begin">From</label> <input type="text"  size="10" id="filter_reminderdate_begin" name="Filter" />
148
                <td>
143
                    <label for="filter_reminderdate_end">To</label> <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" />
149
                    <label for="filter_reminderdate_begin">From</label>
144
                    </td>
150
                    <input type="text" size="10" id="filter_reminderdate_begin" name="Filter" />
151
                    <label for="filter_reminderdate_end">To</label>
152
                    <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" />
153
                </td>
145
             </tr>
154
             </tr>
146
            <tr>
155
            <tr>
147
                <td>Waiting date</td>
156
                <td>Waiting date</td>
148
                <td><input type="radio" name="Line" value="waitingdate" /></td>
157
                <td><input type="radio" name="Line" value="waitingdate" /></td>
149
                <td><input type="radio" name="Column" value="waitingdate" /></td>
158
                <td><input type="radio" name="Column" value="waitingdate" /></td>
150
                <td><label for="filter_waitingdate_begin">From</label> <input type="text"  size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" />
159
                <td>
151
                    <label for="filter_waitingdate_end">To</label> <input  size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" />
160
                    <label for="filter_waitingdate_begin">From</label>
152
                    </td>
161
                    <input type="text" size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" />
162
                    <label for="filter_waitingdate_end">To</label>
163
                    <input  size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" />
164
                </td>
153
             </tr>
165
             </tr>
154
			 <tr>
166
			 <tr>
155
                <td>Cancellation date</td>
167
                <td>Cancellation date</td>
156
                <td><input type="radio" name="Line" value="cancellationdate" /></td>
168
                <td><input type="radio" name="Line" value="cancellationdate" /></td>
157
                <td><input type="radio" name="Column" value="cancellationdate" /></td>
169
                <td><input type="radio" name="Column" value="cancellationdate" /></td>
158
                <td><label for="filter_cancellationdate_begin">From</label> <input type="text"  size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" />
170
                <td>
159
                    <label for="filter_cancellationdate_end">To</label> <input  size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" />
171
                    <label for="filter_cancellationdate_begin">From</label>
160
                    </td>
172
                    <input type="text" size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" />
173
                    <label for="filter_cancellationdate_end">To</label>
174
                    <input  size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" />
175
                </td>
161
             </tr>
176
             </tr>
162
        <tr>
177
        <tr>
163
            <td>Patron category</td>
178
            <td>Patron category</td>
Lines 325-396 Link Here
325
    [% INCLUDE 'calendar.inc' %]
340
    [% INCLUDE 'calendar.inc' %]
326
    <script>
341
    <script>
327
        $(document).ready(function() {
342
        $(document).ready(function() {
328
            // http://jqueryui.com/demos/datepicker/#date-range
343
            var filter_reservedate_begin = $("#filter_reservedate_begin").flatpickr({
329
            var dates = $( "#filter_reservedate_begin, #filter_reservedate_end" ).datepicker({
344
                onClose: function( selectedDates, dateText, instance) {
330
                changeMonth: true,
345
                    validate_date( selectedDates, instance );
331
                numberOfMonths: 1,
346
                    filter_reservedate_end.set('minDate', selectedDates[0]);
332
                onSelect: function( selectedDate ) {
333
                    var option = this.id == "filter_reservedate_begin" ? "minDate" : "maxDate",
334
                        instance = $( this ).data( "datepicker" );
335
                        date = $.datepicker.parseDate(
336
                            instance.settings.dateFormat ||
337
                            $.datepicker._defaults.dateFormat,
338
                            selectedDate, instance.settings );
339
                    dates.not( this ).datepicker( "option", option, date );
340
                }
347
                }
341
            });
348
            });
342
            var datesND = $( "#filter_notificationdate_begin, #filter_notificationdate_end" ).datepicker({
349
            var filter_reservedate_end = $("#filter_reservedate_end").flatpickr({
343
                changeMonth: true,
350
                onClose: function( selectedDates, dateText, instance) {
344
                numberOfMonths: 1,
351
                    validate_date( selectedDates, instance );
345
                onSelect: function( selectedDate ) {
352
                },
346
                    var option = this.id == "filter_notificationdate_begin" ? "minDate" : "maxDate",
353
            });
347
                        instance = $( this ).data( "datepicker" );
354
348
                        date = $.datepicker.parseDate(
355
            var filter_notificationdate_begin = $("#filter_notificationdate_begin").flatpickr({
349
                            instance.settings.dateFormat ||
356
                onClose: function( selectedDates, dateText, instance) {
350
                            $.datepicker._defaults.dateFormat,
357
                    validate_date( selectedDates, instance );
351
                            selectedDate, instance.settings );
358
                    filter_notificationdate_end.set('minDate', selectedDates[0]);
352
                    datesND.not( this ).datepicker( "option", option, date );
353
                }
359
                }
354
            });
360
            });
355
            var datesRD = $( "#filter_reminderdate_begin, #filter_reminderdate_end" ).datepicker({
361
            var filter_notificationdate_end = $("#filter_notificationdate_end").flatpickr({
356
                changeMonth: true,
362
                onClose: function( selectedDates, dateText, instance) {
357
                numberOfMonths: 1,
363
                    validate_date( selectedDates, instance );
358
                onSelect: function( selectedDate ) {
364
                },
359
                    var option = this.id == "filter_reminderdate_begin" ? "minDate" : "maxDate",
365
            });
360
                        instance = $( this ).data( "datepicker" );
366
361
                        date = $.datepicker.parseDate(
367
            var filter_reminderdate_begin = $("#filter_reminderdate_begin").flatpickr({
362
                            instance.settings.dateFormat ||
368
                onClose: function( selectedDates, dateText, instance) {
363
                            $.datepicker._defaults.dateFormat,
369
                    validate_date( selectedDates, instance );
364
                            selectedDate, instance.settings );
370
                    filter_reminderdate_end.set('minDate', selectedDates[0]);
365
                    datesRD.not( this ).datepicker( "option", option, date );
366
                }
371
                }
367
            });
372
            });
368
            var datesWD = $( "#filter_waitingdate_begin, #filter_waitingdate_end" ).datepicker({
373
            var filter_reminderdate_end = $("#filter_reminderdate_end").flatpickr({
369
                changeMonth: true,
374
                onClose: function( selectedDates, dateText, instance) {
370
                numberOfMonths: 1,
375
                    validate_date( selectedDates, instance );
371
                onSelect: function( selectedDate ) {
376
                },
372
                    var option = this.id == "filter_waitingdate_begin" ? "minDate" : "maxDate",
377
            });
373
                        instance = $( this ).data( "datepicker" );
378
374
                        date = $.datepicker.parseDate(
379
            var filter_waitingdate_begin = $("#filter_waitingdate_begin").flatpickr({
375
                            instance.settings.dateFormat ||
380
                onClose: function( selectedDates, dateText, instance) {
376
                            $.datepicker._defaults.dateFormat,
381
                    validate_date( selectedDates, instance );
377
                            selectedDate, instance.settings );
382
                    filter_waitingdate_end.set('minDate', selectedDates[0]);
378
                    datesWD.not( this ).datepicker( "option", option, date );
379
                }
383
                }
380
            });
384
            });
381
            var datesCD = $( "#filter_cancellationdate_begin, #filter_cancellationdate_end" ).datepicker({
385
            var filter_waitingdate_end = $("#filter_waitingdate_end").flatpickr({
382
                changeMonth: true,
386
                onClose: function( selectedDates, dateText, instance) {
383
                numberOfMonths: 1,
387
                    validate_date( selectedDates, instance );
384
                onSelect: function( selectedDate ) {
388
                },
385
                    var option = this.id == "filter_cancellationdate_begin" ? "minDate" : "maxDate",
389
            });
386
                        instance = $( this ).data( "datepicker" );
390
387
                        date = $.datepicker.parseDate(
391
            var filter_cancellationdate_begin = $("#filter_cancellationdate_begin").flatpickr({
388
                            instance.settings.dateFormat ||
392
                onClose: function( selectedDates, dateText, instance) {
389
                            $.datepicker._defaults.dateFormat,
393
                    validate_date( selectedDates, instance );
390
                            selectedDate, instance.settings );
394
                    filter_cancellationdate_end.set('minDate', selectedDates[0]);
391
                    datesCD.not( this ).datepicker( "option", option, date );
392
                }
395
                }
393
            });
396
            });
397
            var filter_cancellationdate_end = $("#filter_cancellationdate_end").flatpickr({
398
                onClose: function( selectedDates, dateText, instance) {
399
                    validate_date( selectedDates, instance );
400
                },
401
            });
394
        });
402
        });
395
    </script>
403
    </script>
396
[% END %]
404
[% END %]
397
- 

Return to bug 28949