Programmatically switch to 'End' selection on 'Start' selection

Hi!

I’m using the datepicker with [‘calendar’, ‘time’] controls. Is there a way to programmatically switch to the range end selection on a day cell click?

Thanks :blush:

Hi @michal,

In this case, you need to use the onCellClick event and the setActiveDate method. For example:

onCellClick={function (event, inst) {
     setTimeout(()=>{
            inst.setActiveDate('end');
     });
}}
1 Like