michael-hack / bulma-calendar

Bulma's extension to display a calendar
MIT License
288 stars 165 forks source link

Issues with time in daterange #269

Closed jesobreira closed 3 years ago

jesobreira commented 3 years ago

Bug Report

Environment

Current Behavior It is not possible to define the final date's time on the timerange.

Furthermore, while changing the dates fires the "select" event, changing the time doesn't, making it impossible to identify whether the time had been changed.

Input Code

var calendar = bulmaCalendar.attach($("#daterange").get(), {
        type: 'datetime',
        isRange: true,
        dateFormat: 'DD/MM/YYYY',
        showClearButton: false,
        showTodayButton: false,
        closeOnSelect: true,
        maxDate: end,
        startDate: start.toDate(),
        endDate: end.toDate()
    })[0]

    calendar.on('select', function() {
        var startDate =calendar.startDate
        var endDate = calendar.endDate
        calendar.save()
        console.log(startDate, endDate)
    })

Additional context/Screenshots Kapture 2021-05-10 at 2 37 38

ccaiuss commented 3 years ago

The same thing happened to me. I tried for a few days to find the problem without success!! This problem also appears in the official demo !

michael-hack commented 3 years ago

Please test the new 6.1.1, this should fix the problem.