seem to pass in configuration options set on the ViewModel in the angularJS controller directly into the flatpickr plugin.
But there appears to be no UI on the DataType in the backoffice for specifying the various options...
... so what you could do is create your own Custom Property Editor that was a wrapper around the umb-date-time-picker directive, but which set the configuration you desired, and call it something like the Future Date Picker...
need to restrict past dates in property on umbraco 10
is it possible to restrict past date in content page by using umbraco 10 date picker?
Currently, I am working on an Umbraco project, and in this project, the content editor is not allowed to set past dates for the property.
Hi vipin
The Umbraco Data Picker is a wrapper around the javascript data picking plugin called flatpickr.js
This plugin does have the concept of minDate and maxDate from which to pick:
https://flatpickr.js.org/options/
It has the option of setting 'minDate' to "today" - to force future dates to be picked:
https://flatpickr.js.org/examples/#mindate-and-maxdate
The directive in Umbraco umb-date-time-picker
https://github.com/umbraco/Umbraco-CMS/blob/6d4809132815b41a6e048904d0769c042abde1cc/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdatetimepicker.directive.js#L96
seem to pass in configuration options set on the ViewModel in the angularJS controller directly into the flatpickr plugin.
But there appears to be no UI on the DataType in the backoffice for specifying the various options...
... so what you could do is create your own Custom Property Editor that was a wrapper around the umb-date-time-picker directive, but which set the configuration you desired, and call it something like the Future Date Picker...
You are not having to really do much custom implementation( https://docs.umbraco.com/umbraco-cms/tutorials/creating-a-property-editor) you are just creating your own housing around the existing implementation to set the config you need on flatpickr
regards
marc
is working on a reply...