Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
santhosh_kumark
santhosh_kumarkAccepted solution
Level 6
September 11, 2020

Hi @grodlegacy ,

 

If your requirement is to restrict the author to not select a past date then it could be achieved with the minDate property with value as "today". Or you can achieve it using Jquery:

$(function() {
$( "#datepicker" ).datepicker({ minDate: 0});
});

 

Regards,

SK

18 replies

Mayank_Gandhi
Adobe Employee
Adobe Employee
September 10, 2020

@grodlegacy  What kind of form are you developing? Is it PDF or Adaptive form.

Translate
Level 2
September 10, 2020
Adaptive
Translate
Mayank_Gandhi
Adobe Employee
Adobe Employee
September 11, 2020

 

@grodlegacy  Use this on date picker:

 

 

var utc = new Date().toJSON().slice(0,10);
if(this.value<utc){

alert("do not select previous dates");
this.value=null;
guideBridge.setFocus(this);
}

Translate
santhosh_kumark
santhosh_kumarkAccepted solution
Level 6
September 11, 2020

Hi @grodlegacy ,

 

If your requirement is to restrict the author to not select a past date then it could be achieved with the minDate property with value as "today". Or you can achieve it using Jquery:

$(function() {
$( "#datepicker" ).datepicker({ minDate: 0});
});

 

Regards,

SK

Translate
Level 2
September 17, 2020
@santhosh_kumark How about using JavaScript? AEM Designer uses JS.
Translate