I have been trying to create something in the style below. But the event never seems to fire when I select a date. Help ?
// validators: [this.sessionStartEndLogic()],
// updateOn: 'change'
1 Answer, 1 is accepted
0
Martin Bechev
Telerik team
answered on 03 Nov 2022, 01:57 PM
Hi Matt,
The DateTimePicker component doesn't have a start and end date. Rather it is a component for selecting a single date and time only.
In case the DateTimePicker is used for selecting a start and end date, the most straightforward approach to verify that the selected ranges are correct is to utilize the min and max properties of the components.
Such an approach will avoid selecting dates that will otherwise generate an invalid duration.
Please let me know if this fits the project, if not please provide some more details about the desired end goal and how the controls are expected to behave. Thank you in advance.
Regards,
Martin
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
that makes sense.. I was just thinking of them as controls I need to validate but really I can just prevent them from ever selecting an invalid date.. ill go try now