This patch replaces the use of jQueryUI's datepicker on serials pages.
To test, apply the patch and test the following serials pages to confirm
that datepickers work correctly. "Linked" date fields should prevent a
"to" selection which preceeds the selected "from" date.
- Claims -> Choose vendor -> Filter missing issues (linked "from" and
"to" fields).
- Check expiration -> "Expiring before" field.
- Manage numbering patterns -> New numbering pattern -> "First issue
publication date" field.
- Serials advanced search -> "Expires before" field.
- Subscription search results -> Check multiple checkboxes -> Edit
selected serials: "Expiration date" field.
- Subscription details -> Serial collection -> Edit serials ->
"Published on" and "Expected on" fields.
- Subscription details -> Renew -> "Start date" field in the popup
window.
- Subscription details -> Edit subscription -> Page 2 -> "First issue
publication date," "Subscription start date," and "Subscription end
date" fields.
- Locate a subscription with manual history enabled. From the
subscription detail page, click the "Planning" tab, then "Edit
history" -> Linked fields "Subscription start date" and "Subscription
end date."
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
[% END %]
<li><label for="date" class="required">Expiring before:</label>
- <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="required focus datepicker" required="required" />
+ <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="required focus flatpickr" required="required" />
<span class="required">Required</span>
<div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
</ol>
<ol>
<li>
<label for="from">From:</label>
- <input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="datepickerfrom" />
+ <input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="flatpickrfrom" />
<label for="to" style="float:none;">To:</label>
- <input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="datepickerto" />
+ <input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="flatpickrto" />
<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
<input id="filterByDate" type="button" value="OK" />
<a href="#" id="clearfilter"><i class="fa fa-remove"></i> Clear filter</a>
}
return true;
});
-
- $(".datepicker").datepicker();
});
//]]>
</script>
Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid | html %]" value="[% serialslis.serialseq | html %]" size="20" maxlength="100" />
</td>
<td>
- <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="datepicker" />
+ <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="flatpickr" />
</td>
<td>
<input type="text" name="publisheddatetext" value="[% serialslis.publisheddatetext | html %]" size="10" maxlength="100" />
</td>
<td>
- <input type="text" name="planneddate" value="[% serialslis.planneddate | html %]" size="10" maxlength="15" class="datepicker" />
+ <input type="text" name="planneddate" value="[% serialslis.planneddate | html %]" size="10" maxlength="15" class="flatpickr" />
</td>
<td>
[% IF ( serialslis.editdisable ) %]
Supplemental issue <input type="text" name="serialseq" id="serialseq[% newserialloo.serialid | html %]" value="" size="20" maxlength="100" onchange="if (this.value!=''){unHideItems('items[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]', '[% newserialloo.serialid | html %]')} else {HideItems('items[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]')}" />
</td>
<td>
- <input type="text" name="publisheddate" value="[% newserialloo.publisheddate | html %]" size="10" maxlength="15" class="datepicker" />
+ <input type="text" name="publisheddate" value="[% newserialloo.publisheddate | html %]" size="10" maxlength="15" class="flatpickr" />
</td>
<td>
<input type="text" name="publisheddatetext" value="[% newserialloo.publisheddatetext | html %]" size="10" maxlength="100" />
</td>
<td>
- <input type="text" name="planneddate" value="[% newserialloo.planneddate | html %]" size="10" maxlength="15" class="datepicker" />
+ <input type="text" name="planneddate" value="[% newserialloo.planneddate | html %]" size="10" maxlength="15" class="flatpickr" />
</td>
<td>
<select name="status" id="addstatus[% newserialloo.serialid | html %]" onchange="if (this.value==2){unHideItems('items'+'[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','[% newserialloo.serialid | html %]'); changeDate(this, '[% newserialloo.arriveddate | html %]')} else if (this.value==7){changeDate(this, '[% newserialloo.arriveddate | html %]')} else { HideItems('items'+'[% newserialloo.subscriptionid | html %]'+[% newserialloo.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.planneddate | html %]')}" >
</li>
<li>
<label for="to">Expires before:</label>
- <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="datepickerto" />
+ <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="flatpickr" />
</li>
[% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_field_filters wrap_fieldset=0 %]
</ol>
<li>
<label for="acqui_date" class="required">First issue publication date:</label>
[% UNLESS (more_than_one_serial) %]
- <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
+ <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="flatpickr required" required="required" />
[% ELSE %]
[% firstacquidate | $KohaDates %]
<input type="hidden" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
[% IF (more_than_one_serial) %]
<li>
<label for="nextacquidate">Next issue publication date:</label>
- <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
+ <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="flatpickr" />
</li>
[% END %]
<li>
</li>
<li>
<label for="from" class="required"> Subscription start date:</label>
- <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
+ <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="flatpickrfrom required" required="required" />
</li>
<li>
<label for="to">Subscription end date:</label>
- <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
+ <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="flatpickrto" />
</li>
<li>
<label for="numberpattern" class="required">Numbering pattern:</label>
</li>
<li>
<label for="enddate">Expiration date: </label>
- <input type="text" class="datepicker" id="enddate" name="enddate" placeholder="No change"/>
+ <input type="text" class="flatpickr" id="enddate" name="enddate" placeholder="No change"/>
</li>
[% FOREACH field IN additional_fields %]
<li>
<tr>
<td>Subscription start date</td>
<td>
- <input type="text" size="10" name="histstartdate" value="[% histstartdate | $KohaDates %]" class="datepickerfrom" /> (start date of the 1st subscription)
+ <input type="text" size="10" name="histstartdate" value="[% histstartdate | $KohaDates %]" class="flatpickrfrom" /> (start date of the 1st subscription)
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</td>
</tr>
<tr>
<td>Subscription end date</td>
<td>
- <input type="text" size="10" name="histenddate" value="[% histenddate | $KohaDates %]" class="datepickerto" />(if empty, subscription is still active)
+ <input type="text" size="10" name="histenddate" value="[% histenddate | $KohaDates %]" class="flatpickrto" />(if empty, subscription is still active)
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</td>
</tr>
</li>
<li>
<label for="firstacquidate">First issue publication date: </label>
- <input type="text" id="firstacquidate" class="datepicker" size="10" />
+ <input type="text" id="firstacquidate" class="flatpickr" size="10" />
</li>
<li>
<label for="sublength">Subscription length:</label>
<ol>
<li>
<label for="startdate">Start date: </label>
- <input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="datepicker"/>
+ <input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="flatpickr"/>
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
<li>