How to prevent selecting future date in a date field

Hi Team,

I would like to prevent selecting the future date in the date field.
Kindly help me with any insight on this.

Note: All the future date should be greyed out and is not able to select (if it is clicked it shouldn't be selected or populated in the date field).




Thanks in Advance!


Bhoobalan P.

Like 0



Hi Bhoobalan,


Please use the column validator instead that will do the same task:

setValidationConfig: function() {
          	dateTimeColumnValidator: function(){
              var invalidMessage = "";
              if (this.get("UsrDatetime1")>this.getSysDefaultValue(Terrasoft.SystemValueType.CURRENT_DATE_TIME)){
               	invalidMessage = this.get("Resources.Strings.ErrorMessage");
                return {
                  invalidMessage: invalidMessage

Just replace the UsrDatetime1 column with your date\rime column name and also create a localizable string with the "ErrorMessage" code.


Best regards,


Oscar Dylan,

Thanks much for the precious response!

But still we could select the future date value, And after validation we throw a error message below the corresponding field name. 

We need to block selecting the future date, which could be possibly achieved via Jquery as below,

    maxDate: 0

How could we achieve the same in our CREATIO Date field ?


Bhoobalan P.

Bhoobalan Palanivelu,


This validator will also return a validation message upon saving a record with an incorrect date, so it's not possible to select the date\time grater than the current date\time:

And this is much easier than creating a custom logic for the date selector modal window so please use this approach.


Best regards,


Show all comments