Semantic-UI-Calendar icon indicating copy to clipboard operation
Semantic-UI-Calendar copied to clipboard

Date range problem

Open JoelTwilo opened this issue 8 years ago • 1 comments

Hi, I'm having a problem with the calendar. I'm using it as a date range picker but if I select a date in the first calendar it doesn't block out the date in the second calendar.

How would I achieve this behavior?

Code is;

$checkin.calendar({
        type: 'date',
        endCalendar: $checkout,
        minDate: new Date(),
        formatter: {
            date: handler.dateFormatter
        },
        onChange: function(date, text){
            searchQuery.checkin = text;
        }
    });

    $checkout.calendar({
        type: 'date',
        startCalendar: $checkin,
        formatter: {
            date: handler.dateFormatter
        },
        onChange: function(date, text){
            searchQuery.checkout = text;
        }
    });

JoelTwilo avatar Mar 15 '17 11:03 JoelTwilo

It looks like you're doing the right thing. Could you please provide an example JSBin that reproduces the issue?

mdehoog avatar Apr 09 '17 00:04 mdehoog