DateTime - Setting up a DateTime Widget with Blackout and Min/Max dates

  1. Start by dragging a TPC Form Layout into the body of your page. Then, drag a CRM Form Configuration widget into the TPC Form Layout. For this example the Form Configuration widget will be configured to use the contact entity.
  2. Click and drag a CRM DateTime widget into the body of your form and click edit to display the properties prompt. For this example the widget will use the Birthday attribute.

    DateTime1
  3. Underneath the Appearance tab, select the Date format as the Birthday attribute doesn’t make use of a time selector.

    DateTime2
  4. Underneath the Validation tab, we will set the minimum and maximum dates. Anything outside of the defined minimum or maximum dates will prevent you from submitting the form.

    DateTime3
  5. Finally, we will be setting some blackout dates underneath the BlackOut Dates tab. You can use Global Blackout Dates, which are defined in the Sitefinity backend, Blackout weekends which will black out all weekends from being selected, and a list of Custom Blackout Dates, where you can add any date to a list of blackout dates.

    Datetime4
  6. On the page, take a look at the date selector for the DateTime widget. You will not be able to select weekends or the dates specified in the custom blackout dates list.

    DateTime5