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

(-)a/Koha/DiscreteCalendar.pm (+3 lines)
Lines 83-88 sub new { Link Here
83
    if ( !defined $self->{branchcode} ) {
83
    if ( !defined $self->{branchcode} ) {
84
        croak 'No branchcode argument passed to Koha::DiscreteCalendar->new';
84
        croak 'No branchcode argument passed to Koha::DiscreteCalendar->new';
85
    }
85
    }
86
    if ( ref $self->{branchcode} eq 'Koha::Library' ) {
87
        $self->{branchcode} = $self->{branchcode}->branchcode;
88
    }
86
    $self->_init();
89
    $self->_init();
87
90
88
    return $self;
91
    return $self;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt (-2 / +6 lines)
Lines 588-593 Link Here
588
                $(this).parent().find(".hint").toggle(); return false;
588
                $(this).parent().find(".hint").toggle(); return false;
589
            });
589
            });
590
            //Set the correct coloring, default date and the date ranges for all datepickers
590
            //Set the correct coloring, default date and the date ranges for all datepickers
591
            [%    IF (dateformat == 'metric') %][% datepickerformat = 'dd/mm/yy' %]
592
            [% ELSIF (dateformat == 'us'    ) %][% datepickerformat = 'mm/dd/yy' %]
593
            [% ELSIF (dateformat == 'iso'   ) %][% datepickerformat = 'yy-mm-dd' %]
594
            [% ELSIF (dateformat == 'dmydot') %][% datepickerformat = 'dd.mm.yy' %]
595
            [% END %]
591
            $.datepicker.setDefaults({
596
            $.datepicker.setDefaults({
592
                beforeShowDay: function(thedate) {
597
                beforeShowDay: function(thedate) {
593
                    return dateStatusHandler(thedate);
598
                    return dateStatusHandler(thedate);
Lines 595-601 Link Here
595
                defaultDate: new Date("[% keydate %]"),
600
                defaultDate: new Date("[% keydate %]"),
596
                minDate: new Date("[% minDate %]"),
601
                minDate: new Date("[% minDate %]"),
597
                maxDate: new Date("[% maxDate %]"),
602
                maxDate: new Date("[% maxDate %]"),
598
                dateFormat: "yy-mm-dd"
603
                dateFormat: "[% datepickerformat %]"
599
            });
604
            });
600
            //Main datepicker
605
            //Main datepicker
601
            $("#jcalendar-container").datepicker({
606
            $("#jcalendar-container").datepicker({
602
- 

Return to bug 17015