File tree Expand file tree Collapse file tree
apps/demos/Demos/Scheduler/CellTemplates/Vue Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { type DxScheduler } from 'devextreme-vue' ;
12import { dinnerTime , holidays } from './data.ts' ;
23
34export default class Utils {
@@ -27,10 +28,10 @@ export default class Utils {
2728 return hours === dinnerTime . from && minutes === 0 ;
2829 }
2930
30- static isValidAppointment ( component : Record < string , any > , appointmentData : Record < string , any > ) {
31+ static isValidAppointment ( component : DxScheduler [ 'instance' ] , appointmentData : Record < string , any > ) {
3132 const startDate = new Date ( appointmentData . startDate ) ;
3233 const endDate = new Date ( appointmentData . endDate ) ;
33- const cellDuration = component . option ( 'cellDuration' ) ;
34+ const cellDuration = component ? .option ( 'cellDuration' ) || 0 ;
3435 return Utils . isValidAppointmentInterval ( startDate , endDate , cellDuration ) ;
3536 }
3637
You can’t perform that action at this time.
0 commit comments