Announcements
Hi All,
I am looking to define a date range in a date field itself that can be selected, as in a week before today and today only. No future dating and Nothing too in the past. I've tried to google but getting a little lost.
Is there an easy way to do this within a model driven app?
Thanks!
Hi @Tia ,
You could add a filter condition in a view.
Best Regards,
Bof
Apologies, I wasn't clear enough - I mean in the date field itself. When selecting a date in the calendar - I want the person to only be able to select very specific dates.
Hello,
If you want those validations to happen in-line you have 2 ways:
1. JavaScript - add 2 fields to the form and write a JavaScript that will handle onChange events of from/to fields and wipe out/reset values if the new datetime value is not valid for the selection.
2. PCF Control. I checked pcf.gallery and the closest that I found was the following - https://pcf.gallery/date-range-control/ but it doesn't allow to limit date ranges to be chosen. It seems that react component it was built on top of allows that limitation of datetime range - https://www.npmjs.com/package/react-date-range
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 397 Super User 2026 Season 2
Mohsin Ali 354
WarrenBelz 232 Most Valuable Professional