I have a document type named "Events" which has "StartDate" and "EndDate" date type fields. I want to add validation logic such that "StartDate" cannot be later than "EndDate". Please kindly advise. Thanks.
Since the datepicker is just a property editor, which makes it possible to select at date it does not know anything about the context in, which it's being used. So it's not something that can be done out of the box.
I think you need to consider making your very own property editor where you can make sure that the startDate can't be higher than the endDate etc.
If you're using Umbraco 7 you need to do this using angularjs. A good source of information about this can be found in the workbook here https://github.com/umbraco/AngularWorkbook
Document Type fields cross validation
Hi,
Sorry if this is already posted.
I have a document type named "Events" which has "StartDate" and "EndDate" date type fields. I want to add validation logic such that "StartDate" cannot be later than "EndDate". Please kindly advise. Thanks.
Hi Zar and welcome to our :)
Since the datepicker is just a property editor, which makes it possible to select at date it does not know anything about the context in, which it's being used. So it's not something that can be done out of the box.
I think you need to consider making your very own property editor where you can make sure that the startDate can't be higher than the endDate etc.
If you're using Umbraco 7 you need to do this using angularjs. A good source of information about this can be found in the workbook here https://github.com/umbraco/AngularWorkbook
I hope this helps.
/Jan
Hi Jan,
Thanks a lot for the quick and useful reply. I will check the Angular work book :)
is working on a reply...