Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Zar Ni Win Latt 5 posts 25 karma points
    Nov 17, 2014 @ 11:45
    Zar Ni Win Latt

    Document Type fields cross validation


    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.

  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Nov 17, 2014 @ 12:34
    Jan Skovgaard

    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

    I hope this helps.


  • Zar Ni Win Latt 5 posts 25 karma points
    Nov 18, 2014 @ 04:49
    Zar Ni Win Latt

    Hi Jan,

    Thanks a lot for the quick and useful reply. I will check the Angular work book :)

Please Sign in or register to post replies

Write your reply to: