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 587-592 Link Here
587
                $(this).parent().find(".hint").toggle(); return false;
587
                $(this).parent().find(".hint").toggle(); return false;
588
            });
588
            });
589
            //Set the correct coloring, default date and the date ranges for all datepickers
589
            //Set the correct coloring, default date and the date ranges for all datepickers
590
            [%    IF (dateformat == 'metric') %][% datepickerformat = 'dd/mm/yy' %]
591
            [% ELSIF (dateformat == 'us'    ) %][% datepickerformat = 'mm/dd/yy' %]
592
            [% ELSIF (dateformat == 'iso'   ) %][% datepickerformat = 'yy-mm-dd' %]
593
            [% ELSIF (dateformat == 'dmydot') %][% datepickerformat = 'dd.mm.yy' %]
594
            [% END %]
590
            $.datepicker.setDefaults({
595
            $.datepicker.setDefaults({
591
                beforeShowDay: function(thedate) {
596
                beforeShowDay: function(thedate) {
592
                    return dateStatusHandler(thedate);
597
                    return dateStatusHandler(thedate);
Lines 594-600 Link Here
594
                defaultDate: new Date("[% keydate %]"),
599
                defaultDate: new Date("[% keydate %]"),
595
                minDate: new Date("[% minDate %]"),
600
                minDate: new Date("[% minDate %]"),
596
                maxDate: new Date("[% maxDate %]"),
601
                maxDate: new Date("[% maxDate %]"),
597
                dateFormat: "yy-mm-dd"
602
                dateFormat: "[% datepickerformat %]"
598
            });
603
            });
599
            //Main datepicker
604
            //Main datepicker
600
            $("#jcalendar-container").datepicker({
605
            $("#jcalendar-container").datepicker({
601
- 

Return to bug 17015