Date Restriction

QuestionsDate Restriction
Giovanni Luca Bonelli asked 9 years ago

Hi Abu!
I want to prevent new rows adding with date field earlier than yesterday.
Can You explain "how to"?

I try with:

$col["formatoptions"] = array("opts" => array("minDate"=> -1));

Datepicker show only available dates but I have 2 problem:

1- Datepicker doesn't work when I select one of available dates
2- I can manually insert a date without restriction

Thank You.

2 Answers
Abu Ghufran answered 9 years ago

1) Unable to regenerate this issue. It works as expected.
2) Set $col["editoptions"]["readonly"]="readonly"; …. it will make field non-type-able and only work with selection.

Giovanni Luca Bonelli answered 8 years ago

I don't know why, but so rewritten, It works!

$col["formatoptions"][opts]["minDate"]=-1;

Your Answer

11 + 6 =

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?