Block DatePicker to go no further than today

QuestionsBlock DatePicker to go no further than today
Alberto asked 3 years ago

Hi,

Is there a way to block a date picker from the grid, to not allow dates selections that go further than todays date?

1 Answers
Abu Ghufran Staff answered 3 years ago

Hello,

You need to set maxDate param like below:

$col["formatter"] = "date";
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y', "opts" => array("changeYear" => true, "dateFormat"=>'dd/mm/yy', "maxDate"=>"+0d"));

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

1 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?