How do i apply validation in widget level when datatype is Date?data

Hi,


I read below URL for adding an element on the widget:-

https://community.telligent.com/community/9/w/developer-training/52490/supporting-configuration

But didn't get a solution for my query. 

Whenever I open and save widget without entering a date. It saved widget without a date. My requirement is when a user selects start date then the event should occur on DOM otherwise it shouldn't show. Date can't empty. It should always check date if it is visible.
I applied few things which are below:-

<property use="required" pattern="\d{1,2}/\d{1,2}/\d{4}" id="startdate"  dataType="date" resourceName="CF_Start_Date" value="start_date" />

Parents
  • Configuration properties do not currently support options to make them required. Some potential solutions include:

    1. When a date is not specified, use a default date (such as today).
    2. When rendering the widget, if the date is not specified, render an error from the widget (you can also do this only in preview mode so it doesn't affect other users... just the page editor).
Reply
  • Configuration properties do not currently support options to make them required. Some potential solutions include:

    1. When a date is not specified, use a default date (such as today).
    2. When rendering the widget, if the date is not specified, render an error from the widget (you can also do this only in preview mode so it doesn't affect other users... just the page editor).
Children