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

Return to bug 17015