Hi. I use the DateRangePicker component with some custom settings, and I have a hard time implementing them, so I would appreciate your help. :)
First, I would like to always show the calendar when I click on the input. With predefined ranges its only showing when the 'Custom range' option is selected, so I managed to achive this by triggering a click on the custom range li element on open:
config.open = (e) => {
const customRangeOption = daterangepicker.presetElement.querySelector(
'.e-presets li.e-list-item#custom_range',
);
customRangeOption?.click();
daterangepicker.focusIn();
};
However, I want to be able to click on any of the presets and display them in the calendar, so in this example above, the previous week is selected, so that should be the selected preset.
Also, I would like to prevent the popoup from closing without clicking on the Apply button. so I can only change the value of the input if its confirmed.
Thanks for your help!
Nik