Hi Team,
Validation is not working for Start Time and End Time, Can you please help me with the Example.
Thanks
Validation which I am looking into
1) Event cannot be created the past day
2) if the Start time and end time are same the Event should not able to save the event.
please help me achieve this two,
Thanks in Advance
Hi Keerthana,
I am using EJ2 , Please find the Screenshot , I am looking to disable or validate Past Day (User shouldn't be able to create any events in the past days, its should be avaliable for present or future days only) and also I am able to create an event with same start time and end time( User shouldn't be able to keep same date for start time and end time) as well, Please help me with this.
Thnaks in Advance
Hi Berly,
Please find the screenshot,
in the pop-up where we see start and end fields, I wanted to use requirement(where start and end time shouldn't be same ) need to validate it, how can I achieve that ? please help me with that
Thanks in advance.
onPopupClose(args) {
if (args.type === 'Editor') {
if (args.data.StartTime.getTime() === args.data.EndTime.getTime()) {
args.cancel = true;
alert('StartTime and EndTime are same');
}
} |
Hi Praveen Kumar,
Thank you so much for your response, also i have one last question
I have used date validation, please see the screenshot below
1) good thing I cannot create an event in the past day, but events from past are not displaying.
is it possible to display but not edit them for past days???????
2)and if you see today date is 12/16 but the date validation is applied for today as well, which is weird when i open a pop-up to schedule a new event it displays right, Please see the screenshot
look at the code snippet below ,Thanks in Advance
public date: Date = new Date();
public minDate: any = this.date.setTime(
this.date.getTime() - 1 * 24 * 60 * 60 * 1000 // 1 day lesser than today
);
|