when the user clicks on a cell in which there are no events, I would like to obtain automatically the time range related to the clicked cell
You can access the time range boundaries using args.start and args.end in onTimeRangeSelected event handler. Please see also: https://api.daypilot.org/daypilot-scheduler-ontimerangeselected/
You can also get the current position using getCoords() method: https://api.daypilot.org/daypilot-scheduler-getcoords/