How to set default value in V5 date range picker

I have the following code:

    $(this).mobiscroll5().datepicker({
       headerText: 'Select two dates',
       select: 'range',
       display:'bottom',
       defaultSelection: ['2023-01-01','2023-01-31'],
       returnFormat: 'iso8601',
       buttons:['cancel','set'],
       startInput: frominput,
       endInput: toinput,
       theme: 'material',
       dateFormat: js_dateformat,
       min: mindate,
       max: maxdate
    });

And with this I would expect the input to display “Jan 1 to Jan 31”, but it doesn’t. It just says “Select start and end dates”. How do I get it to display the date range I’m passing in?

Hello @Vincent_Wansink :wave:

You can easily solve that with the setVal method.