[SalesForce] how to avoid picking old date in datetime picker in inline vfpage

I have a date time picker as a calendar. is there anyway that i avoid backdating in the calendar ?
It should be only pick today and future dates.

Thank you all.

Best Answer

Not sure if there is a way to have a client side restriction on date range. Alternatively you can apply a validation rule on the field to keep the data as you need.
If your field is of type Date,
Your_Field < TODAY()
If your field is of type DateTime,

Also make sure to do the data cleanup for the existing data if you are applying such a validation. If not the reports will show unacceptable data to your managers ;)

Related Topic