Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
Marcel de Rooy 904a358da3 Bug 15652: Allow current date in datepicker on opac-reserve
If you enable AllowHoldDateInFuture (and its OPAC variant), you get
an additional "Hold starts on date". In that field and in "Hold not
needed after" it was not possible to enter the current date.

Although it does not really make any difference if you leave the startdate
empty or put the current date in it, we concluded that it still makes
a psychological difference. Some patrons were confused when placing a
hold because the first date to select was tomorrow. Instead of telling
them "Yes, but you can leave it empty", we should just allow the current
date as well.

The expiration date ("not needed after") also started on tomorrow. (This
field can really be empty.) But there is actually no reason not to allow
today here too. If the patron only wants it today, why force tomorrow?

How is this arranged? Well, this is one of the simplest Koha patches ever
written. It only changes the minDate option of both date pickers in one
line from 1 to 0.

Test plan:
[1] Allow future hold dates via systempreferences.
[2] Verify that you can enter today in both fields.
[3] Put today in start and expiration date. Place the hold and verify that
    you can confirm the hold, check out and check in again.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-24 02:06:00 +00:00

648 lines
40 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% USE Price %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Placing a hold</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-holds' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Placing a hold</a></li>
</ul>
<div class="container">
<div id="holds">
[% IF ( message ) %]
<div id="holdmessages" class="alert">
<p><strong>Sorry</strong>, you cannot place holds.</strong></p>
<ul>
[% IF ( GNA ) %]
<li id="gna">
According to our records, we don't have up-to-date contact information. Please contact the library.
<a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
[% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
</li>
[% END %]
[% IF ( lost ) %]
<li id="lost">
Your library card has been marked as lost or stolen.<br />
<em>If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.</em>
</li>
[% END %]
[% IF ( debarred ) %]
<li id="debarred">
Your account has been frozen.
[% IF debarred_comment %] Comment: <span id="userdebarred_comment">"[% debarred_comment %]"</span>[% END %]
[% IF debarred_date && debarred_date != '9999-12-31' %] End date: <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>[% END %]
<br /><em>Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a>
</li>
[% END %]
[% IF ( too_much_oweing ) %]
<li id="too_much_oweing">
You have unpaid fines. Amount: [% too_much_oweing | $Price %].
</li>
[% END %]
[% IF ( too_many_reserves ) %]
<li id="too_many_reserves">
Sorry, you cannot place more than [% too_many_reserves %] holds.
</li>
[% END %]
[% IF ( bad_biblionumber ) %]
<li id="bad_biblionumber">
ERROR: No record found for record id [% bad_biblionumber %].
</li>
[% END %]
[% IF ( no_items_selected ) %]
<li id="no_items_selected">
You must select at least one item.
</li>
[% END %]
[% IF ( no_branch_selected ) %]
<li id="no_branch_selected">
You must select a library for pickup.
</li>
[% END %]
[% IF ( no_biblionumber ) %]
<li id="no_biblionumber">
ERROR: No record id specified.
</li>
[% END %]
[% IF ( bad_data ) %]
<li id="bad_data">
ERROR: Internal error: incomplete hold request.
</li>
[% END %]
[% IF ( expired_patron ) %]
<li id="expired_patron">
Your library card has expired. Please contact your librarian if you wish to renew your card.
</li>
[% END %]
[% ELSE %]
[% IF ( none_available ) %]
<div id="none_available" class="alert">
<strong>Sorry</strong>, none of these items can be placed on hold.
</div>
[% END %]
</div>
[% END # / IF message %]
[% UNLESS ( message ) %]
[% UNLESS ( none_available ) %]
<h3>Confirm holds for:[% USER_INFO.firstname %] [% USER_INFO.surname %] ([% USER_INFO.cardnumber %])</h3>
[% END # / UNLESS none_available %]
[% IF (RESERVE_CHARGE) %]
<div class="alert" id="reserve_fee">
There is a charge of [% RESERVE_CHARGE %] for placing this hold
</div>
[% END %]
[% IF ( new_reserves_allowed ) %]
<div id="new_reserves_allowed" class="alert">
<strong>Sorry,</strong> you can only place [% new_reserves_allowed %] more holds. Please uncheck the checkboxes for the items you wish to not place holds on.
</div>
[% END %]
<form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
<input type="hidden" name="place_reserve" value="1"/>
<!-- These values are set dynamically by js -->
<input type="hidden" name="biblionumbers" id="biblionumbers"/>
<input type="hidden" name="selecteditems" id="selections"/>
<div id="bigloop">
[% FOREACH bibitemloo IN bibitemloop %]
<div class="holdrow">
<p>
[% IF ( bibitemloo.holdable ) %]
<input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
<input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber %]"/>
<span class="confirmjs_hold" title="[% bibitemloo.biblionumber %]" style="padding:.3em"></span>
<span class="confirm_nonjs">
<input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber %]" name="[% bibitemloo.biblionumber %]" checked="checked" id="single_[% bibitemloo.biblionumber %]" value="any" />
<label class="confirm_label" for="single_[% bibitemloo.biblionumber %]">Place a hold on </label>
</span>
[% END # / bibitemloo.holdable %]
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber %]">
[% bibitemloo.title |html %]
[% IF ( bibitemloo.subtitle ) %]
[% FOREACH subtitl IN bibitemloo.subtitle %]
[% subtitl.subfield %]
[% END %]
[% END %]
</a>
[% IF ( bibitemloo.author ) %], by [% bibitemloo.author %][% END %]
</p>
[% UNLESS ( bibitemloo.holdable ) %]
[% IF ( bibitemloo.ageRestricted ) %]
<div class="alert">Sorry, you are too young to reserve this material.</div>
[% END %]
[% IF ( bibitemloo.already_reserved ) %]
<div class="alert">You have already requested this title.</div>
[% ELSE %]
[% UNLESS ( bibitemloo.bib_available ) %]
<div class="alert">No available items.</div>
[% ELSE %]
[% IF ( bibitemloo.already_patron_possession ) %]
<div class="alert">This title cannot be requested because it's already in your possession.</div>
[% ELSE %]
<div class="alert">This title cannot be requested.</div>
[% END %]
[% END # / UNLESS bibitemloo.bib_available %]
[% END # / IF bibitemloo.already_reserved %]
[% END # / UNLESS bibitemloo.holdable %]
[% IF ( bibitemloo.holdable ) %]
<fieldset class="rows">
<ul>
<!-- HOLDABLE -->
[% UNLESS ( item_level_itypes ) %]
<li class="itype">
<span class="label">Item type: </span>
[% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl %]" alt="" />[% END %]
[% bibitemloo.translated_description %]
</li>
[% END %]
[% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
[% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
<li class="priority">
<span class="label">Your priority: </span>
[% bibitemloo.rank %]
</li>
[% END %]
[% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
<li class="holds-count">
<span class="label">Number of holds: </span>
[% bibitemloo.reservecount %]
</li>
[% END %]
[% UNLESS ( singleBranchMode ) %]
[% IF ( bibitemloo.holdable && choose_branch ) %]
<li class="branch">
<label for="branch_[% bibitemloo.biblionumber %]">Pick up location:</label>
[% UNLESS ( bibitemloo.holdable ) %]
<select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
[% FOREACH branchloo IN bibitemloo.branchloop %]
[% IF ( branchloo.selected ) %]
<option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
[% ELSE %]
<option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
[% END %]
[% END %]
</select>
[% ELSE %]
<select name="branch" id="branch_[% bibitemloo.biblionumber %]">
[% FOREACH branchloo IN bibitemloo.branchloop %]
[% IF ( branchloo.selected ) %]
<option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
[% ELSE %]
<option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
[% END %]
[% END %]
</select>
[% END # / UNLESS bibitemloo.holdable %]
</li>
[% END # / IF bibitemloo.holdable && choose_branch %]
[% END # / UNLESS singleBranchMode %]
</ul>
<a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber %]" style="display:none;" href="#">Show more options</a>
<div id="hold-options-[% bibitemloo.biblionumber %]" class="hold-options">
<ul>
[% IF ( reserve_in_future ) %]
<li>
<label for="from[% bibitemloo.biblionumber %]">Hold starts on date:</label>
<input name="reserve_date_[% bibitemloo.biblionumber %]" id="from[% bibitemloo.biblionumber %]" size="10" class="holddatefrom"/>
<span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber %]">[% INCLUDE 'date-format.inc' %]</span>
</li>
[% END %]
<li>
<label for="to[% bibitemloo.biblionumber %]">Hold not needed after:</label>
<input name="expiration_date_[% bibitemloo.biblionumber %]" id="to[% bibitemloo.biblionumber %]" size="10" class="holddateto" />
<span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber %]">[% INCLUDE 'date-format.inc' %]</span>
</li>
[% IF ( OpacHoldNotes ) %]
<li>
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]">
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label>
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span>
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea>
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/>
</div>
</li>
[% END # / IF OpacHoldNotes %]
<li>
</li>
[% IF bibitemloo.itemholdable %]
<!-- ITEM HOLDS -->
<li class="lradio place_on_type" style="display:none;">
[% IF NOT bibitemloo.force_hold %]
<label class="radio inline" for="reqany_[% bibitemloo.biblionumber %]">Next available item</label>
<input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
id="reqany_[% bibitemloo.biblionumber %]"
class="selectany"
value="Any"
checked="checked"
/>
[% END %]
<label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber %]">A specific item</label>
<input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
id="reqspecific_[% bibitemloo.biblionumber %]"
class="selectspecific"
value="Specific"
/>
</li>
[% END # / IF bibitemloo.itemholdable %]
</ul>
[% IF bibitemloo.itemholdable %]
<table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber %]">
<caption>Select a specific item:</caption>
<tr>
<th>Copy number</th>
[% IF ( item_level_itypes ) %]
<th>Item type</th>
[% END %]
<th>Barcode</th>
[% UNLESS ( singleBranchMode ) %]
<th>Home library</th>
<th>Last location</th>
[% END %]
<th>Call number</th>
[% IF ( itemdata_enumchron ) %]
<th>Vol info</th>
[% END %]
<th>Information</th>
</tr>
[% FOREACH itemLoo IN bibitemloo.itemLoop %]
<tr class="[% itemLoo.backgroundcolor %]">
<td class="copynumber">
[% IF ( itemLoo.available ) %]
<input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]" value="[% itemLoo.itemnumber %]" />
[% ELSE %]
<input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]"
style="display:none;" />
<img src="[% interface %]/lib/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
[% END %]
[% IF ( itemLoo.copynumber ) %]
[% itemLoo.copynumber %]
[% END %]
</td>
[% IF ( item_level_itypes ) %]
<td class="itype">
[% UNLESS ( noItemTypeImages ) %]
[% IF ( itemLoo.imageurl ) %]
<img src="[% itemLoo.imageurl %]" alt="" />
[% END %]
[% END %]
[% itemLoo.translated_description %]
</td>
[% END %]
<td class="barcode">[% itemLoo.barcode %]</td>
[% UNLESS ( singleBranchMode ) %]
<td class="homebranch">[% itemLoo.homeBranchName %]</td>
<td class="holdingbranch">[% itemLoo.holdingBranchName %]</td>
[% END %]
<td class="call_no">[% itemLoo.callNumber %]</td>
[% IF ( itemdata_enumchron ) %]
<td class="vol_info">[% itemLoo.enumchron %]</td>
[% END %]
<td class="information">
[% IF ( itemLoo.dateDue ) %]
<span class="checkedout">Due [% itemLoo.dateDue %]</span>
[% ELSIF ( itemLoo.transfertwhen ) %]
<span class="intransit">In transit from [% itemLoo.transfertfrom %] to [% itemLoo.transfertto %] since [% itemLoo.transfertwhen %]</span>
[% END %]
[% IF ( itemLoo.message ) %]
<span class="lost">Unavailable (lost or missing)</span>
[% END %]
[% IF ( itemLoo.notforloan ) %]
<span class="notforloan">Not for loan ([% itemLoo.notforloanvalue %])</span>
[% END %]
[% IF ( itemLoo.reservedate ) %]
<span class="waiting">
[% IF ( itemLoo.waitingdate ) %]
Waiting
[% ELSE %]
On hold
[% END %]
for patron
[% IF ( itemLoo.waitingdate ) %]
at
[% ELSE %]
expected at
[% END %]
[% itemLoo.ExpectedAtLibrary %] since
[% IF ( itemLoo.waitingdate ) %]
[% itemLoo.waitingdate | $KohaDates %]
[% ELSE %]
[% IF ( itemLoo.reservedate ) %]
[% itemLoo.reservedate %]
[% END %]
[% END %].
</span>
[% ELSE %]
<span class="notonhold">Not on hold</span>
[% END # / IF ( itemLoo.reservedate )%]
</td>
</tr>
[% END # / FOREACH itemLoo IN bibitemloo.itemLoop%]
</table> <!-- / #copiesrow_[% bibitemloo.biblionumber %] -->
[% END # / IF ( bibitemloo.itemholdable )%]
</div> <!-- / #hold-options-[% bibitemloo.biblionumber %] -->
</fieldset>
[% END # / IF ( bibitemloo.holdable ) %]
</div> <!-- / .holdrow -->
[% END # / FOREACH bibitemloo IN bibitemloop %]
</div><!-- #bigloop -->
[% UNLESS ( none_available ) %]
<input type="submit" value="Place hold" class="btn placehold" />
[% END %]
</form>
[% END # / UNLESS message %]
</div> <!-- / #holds -->
</div> <!-- / .container -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript">
// <![CDATA[
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection.");
var ForceHoldNotesReasons=new Array(
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."),
"*** Add a new reason above this line ***" );
// NOTE: Do not renumber reasons; this will affect use of existing ones.
// Clear the contents of an input field
$(".clearfield").on("click",function(e){
$(this).closest("td").find("input").val("");
e.preventDefault();
});
// Select the first item available
function select_first_available(id){
var radios = $("input:radio[name='checkitem_" + id + "']");
$(radios).first().attr("checked", "checked");
}
$(document).ready(function() {
$("#hold-request-form").preventDoubleFormSubmit();
var copiesRowId = null;
var wasSpecific = false;
var lastCopiesRowId = null;
$(".toggle-hold-options").show();
$(".hold-options").hide();
$(".holddatefrom,.holddateto").prop("readOnly", true);
$(".checkitem").parent().click(function(e){
if(e.target.tagName.toLowerCase() == 'td'){
$(this).find("input.checkitem").each( function() {
$(this).attr('checked', 'checked');
});
}
});
// click on a first td check the confirmjs checkbox
$("td.hold").click(function(e){
if(e.target.tagName.toLowerCase() == 'td'){
$(this).find("input.confirmjs").each( function() {
$(this).attr('checked', !$(this).attr('checked'));
$(this).change();
});
}
});
$(".toggle-hold-options").on("click",function(e){
e.preventDefault();
toggleLink = $(this);
var optionsID = this.id.replace("toggle-hold-options-","");
$("#hold-options-"+optionsID).toggle(0, function() {
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options"));
});
});
// Hides all 'specific copy' table rows on load.
$(".copiesrow").hide();
[% FOREACH bibitemloo IN bibitemloop %]
[% IF bibitemloo.force_hold %]
$("#toggle-hold-options-[% bibitemloo.biblionumber %]").click();
$("#reqspecific_[% bibitemloo.biblionumber %]").click();
$("#copiesrow_[% bibitemloo.biblionumber %]").show();
[% END %]
[% END %]
// Insert reasons for forced hold notes
$(".forcenotesreason").each(function(){
biblioNum = suffixOf($(this).attr("id"), "_");
var j=$("#notesmandatory_"+biblioNum).val();
if(j>0) {
$(this).html(ForceHoldNotesReasons[j-1]);
}
});
$(".date-format").each(function(){
if($(this).hasClass("to")){ var op = "to"; }
if($(this).hasClass("from")){ var op = "from"; }
var bibNum = $(this).data("biblionumber");
$(this).html("<a href=\"#\" class=\"clear-date\" data-op=\"" + op + "\" id=\"clear" + bibNum + "\">" + _("Clear date") + "</a>");
});
$(".clear-date").on("click",function(e){
e.preventDefault();
var fieldID = this.id.replace("clear","");
var op = $(this).data("op");
$("#" + op + fieldID).val("");
});
// Replace non-JS single-selection with multi-selection capability.
$(".reserve_mode").val("multi");
$(".confirm_nonjs").remove();
$(".confirmjs_hold").each(function(){
var bib = $(this).attr("title");
var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
html += "value=\"" + bib + "\" id=\"" + bib + "\" /> " + _("Place a hold on") + " </label> ";
$(this).html(html);
});
$(".confirmjs_nohold").each(function(){
var bib = $(this).attr("title");
var html = "<label><input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
html += "value=\"" + bib + "\" id=\"" + bib + "\" />" + _("Place a hold on: ") + "</label>";
$(this).html(html);
});
// expand or collapse the copiesrow tr
function toggle_copiesrow(biblioNum) {
var checkbox = $("input:checkbox[value='"+biblioNum+"']");
newCopiesRowId = "#copiesrow_" + biblioNum;
var select_specific = $("#reqspecific_"+biblioNum).is(":checked");
// If the checkbox is checked AND we want a specific item, we display the items block
if ( $(checkbox).is(":checked") && select_specific ) {
$(newCopiesRowId).show();
} else {
$(newCopiesRowId).hide();
}
};
$("#place_on_hdr").show();
$(".place_on_type").show();
// onload, selectany is checked
$(".selectany").attr("checked", "checked");
// If the user is *allowed* to choose a specific item
// The first one is preselected
$("table.copiesrow").each(function(){
var id = suffixOf($(this).attr("id"), "_");
select_first_available(id);
});
// On confirmsjs change
$(".confirmjs").change(function(){
var id = suffixOf($(this).attr("id"), "_");
// If I m checked, I enable radio buttons
if ( $(this).is(":checked") ) {
$("#reqspecific_" + id).attr("disabled", false);
$("#reqany_" + id).attr("disabled", false);
}
// Else its are disabled
else {
$("#reqspecific_" + id).attr("disabled", "disabled");
$("#reqany_" + id).attr("disabled", "disabled");
}
// expand or collaspe the items block
toggle_copiesrow(id);
});
// When 'specific copy' or 'first available' radio button is clicked
$(".selectspecific, .selectany").click(function() {
var id = suffixOf($(this).attr("id"), "_");
toggle_copiesrow(id);
});
// Show or hide holds notes
$(".shownotes").click(function(){
biblioNum = suffixOf($(this).attr("id"), "_");
$("#notesrow_"+biblioNum).toggle();
});
// When 'Place Hold' button is clicked
$(".placehold").click(function(){
var biblionumbers = "";
var selections = "";
[% IF new_reserves_allowed %]
if ($(".confirmjs:checked").size() > [% new_reserves_allowed %] ) {
alert(MSG_MAX_HOLDS_EXCEEDED);
return false;
}
[% END %]
if ($(".confirmjs:checked").size() == 0) {
alert(MSG_NO_RECORD_SELECTED);
return false;
}
// Find the items with the 'Hold' box checked
var badBib = null;
$(".confirmjs:checked").each(function() {
var biblioNum = $(this).val();
biblionumbers += biblioNum + "/";
selections += biblioNum + "/";
// If the 'specific copy' radio button is checked
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
// Find the selected copy
var item = $(".checkitem_" + biblioNum + ":checked");
if ($(item).size() == 0) {
badBib = biblioNum;
return false;
} else {
selections += $(item).val();
}
}
selections += "/";
// Add the pickup location
var branchSel = $("#branch_" + biblioNum);
if (branchSel.size() > 0) {
selections += $(branchSel).val();
}
selections += "/";
return true;
});
if (badBib) {
alert(MSG_NO_ITEM_SELECTED);
return false;
}
$("#selections").val(selections);
$("#biblionumbers").val(biblionumbers);
return true;
});
[% FOREACH bibitemloo IN bibitemloop %]
[% IF ( bibitemloo.holdable ) %]
// http://jqueryui.com/demos/datepicker/#date-range
var dates[% bibitemloo.biblionumber %] = $( "#from[% bibitemloo.biblionumber %], #to[% bibitemloo.biblionumber %]" ).datepicker({
minDate: 0,
changeMonth: true,
numberOfMonths: 1,
onSelect: function( selectedDate ) {
var option = this.id == "from[% bibitemloo.biblionumber %]" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" );
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates[% bibitemloo.biblionumber %].not( this ).datepicker( "option", option, date );
}
});
[% END %]
[% END %]
});
// ]]>
</script>
[% END %]