@@ -, +, @@
- Tools -> Patron clubs -> New club: Linked "start date" and "end date"
fields.
- ILL requests: Two linked pairs of date fields in the sidebar, "Date
placed between" and "Updated between." Each pair should work correctly
and table filtering by date should work correctly.
- Tools -> Label creator -> Manage -> Layout batches -> Edit a batch ->
Add items. This should trigger a popup window with a linked pair of
date fields, "Added on or after date," and "Added on or before date."
- Point of sale -> Transaction history: "From" and "To" linked date
field in the "Older transactions" section.
- Acquisitions -> Suggestions -> Add a suggestion: "Created by,"
"Accepted on," and "Managed by" fields.
- Tools -> Tags -> Filter tags by date.
---
.../prog/en/modules/clubs/clubs-add-modify.tt | 4 +--
.../prog/en/modules/ill/ill-requests.tt | 8 ++---
.../prog/en/modules/labels/search.tt | 21 ++++++------
.../prog/en/modules/pos/register.tt | 21 ++----------
.../prog/en/modules/suggestion/suggestion.tt | 6 ++--
.../prog/en/modules/tags/review.tt | 4 +--
.../intranet-tmpl/prog/js/ill-list-table.js | 34 ++++++++++++++++---
7 files changed, 54 insertions(+), 44 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt
@@ -73,12 +73,12 @@
Start date:
-
+
End date:
-
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
@@ -73,19 +73,19 @@
Date placed between:
-
+
and:
-
+
Updated between:
-
+
and:
-
+
Library:
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt
@@ -88,16 +88,17 @@ to add to Batch [% batch_id | html %]
-
- Added on or after date:
-
-[% INCLUDE 'date-format.inc' %]
-
-
- Added on or before date:
-
-[% INCLUDE 'date-format.inc' %]
-
+
+ Added on or after date:
+
+ [% INCLUDE 'date-format.inc' %]
+
+
+ Added on or before date:
+
+ [% INCLUDE 'date-format.inc' %]
+
+
Cancel
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
@@ -160,9 +160,9 @@
From:
-
+
To:
-
+
[% INCLUDE 'date-format.inc' %]
@@ -471,23 +471,6 @@
}
]
}, [], 1);
-
- $(document).ready(function() {
- // http://jqueryui.com/demos/datepicker/#date-range
- var dates = $( "#from, #to" ).datepicker({
- changeMonth: true,
- numberOfMonths: 1,
- onSelect: function( selectedDate ) {
- var option = this.id == "from" ? "minDate" : "maxDate",
- instance = $( this ).data( "datepicker" );
- date = $.datepicker.parseDate(
- instance.settings.dateFormat ||
- $.datepicker._defaults.dateFormat,
- selectedDate, instance.settings );
- dates.not( this ).datepicker( "option", option, date );
- }
- });
- });
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
@@ -500,7 +500,7 @@
[% tp('purchase suggestion created by', 'Created by:') | html %]
- [% INCLUDE 'date-format.inc' %]
+ [% INCLUDE 'date-format.inc' %]
@@ -517,7 +517,7 @@
Accepted on:
- [% INCLUDE 'date-format.inc' %]
+ [% INCLUDE 'date-format.inc' %]
@@ -547,7 +547,7 @@
Managed on:
- [% INCLUDE 'date-format.inc' %]
+ [% INCLUDE 'date-format.inc' %]
by:
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
@@ -230,11 +230,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
Date: from
-
+
[% INCLUDE 'date-format.inc' %]
...to
-
+
[% INCLUDE 'date-format.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js
@@ -335,6 +335,32 @@ $(document).ready(function() {
$('#addcomment').toggleClass('content_hidden');
});
+ var illfilter_dateplaced_start = $("#illfilter_dateplaced_start").flatpickr({
+ onClose: function( selectedDates, dateText, instance) {
+ validate_date( selectedDates, instance );
+ illfilter_dateplaced_end.set('minDate', selectedDates[0]);
+ }
+ });
+
+ var illfilter_dateplaced_end = $("#illfilter_dateplaced_end").flatpickr({
+ onClose: function( selectedDates, dateText, instance) {
+ validate_date( selectedDates, instance );
+ },
+ });
+
+ var illfilter_datemodified_start = $("#illfilter_datemodified_start").flatpickr({
+ onClose: function( selectedDates, dateText, instance) {
+ validate_date( selectedDates, instance );
+ illfilter_datemodified_end.set('minDate', selectedDates[0]);
+ }
+ });
+
+ var illfilter_datemodified_end = $("#illfilter_datemodified_end").flatpickr({
+ onClose: function( selectedDates, dateText, instance) {
+ validate_date( selectedDates, instance );
+ },
+ });
+
// Filter partner list
// Record the list of all options
var ill_partner_options = $('#partners > option');
@@ -498,10 +524,10 @@ $(document).ready(function() {
// Custom date range filtering
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {
- var placedStart = $('#illfilter_dateplaced_start').datepicker('getDate');
- var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate');
- var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate');
- var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate');
+ var placedStart = illfilter_dateplaced_start.selectedDates[0];
+ var placedEnd = illfilter_dateplaced_end.selectedDates[0];
+ var modifiedStart = illfilter_datemodified_start.selectedDates[0];
+ var modifiedEnd = illfilter_datemodified_end.selectedDates[0];
var rowPlaced = data[14] ? new Date(data[14]) : null;
var rowModified = data[16] ? new Date(data[16]) : null;
var placedPassed = true;
--