M
M
Mikha Pankratov2015-12-03 23:03:02
JavaScript
Mikha Pankratov, 2015-12-03 23:03:02

How to define clearly the interval of years in the datepicker?

Good night,

I ran into such a problem clearly in the config, I sort of registered the output of the interval, from such and such a year to such -

'clientOptions' => [
                            'changeMonth' => true, 
                            'changeYear' => true, 
                            'yearRange' => '1945:2000',
}


But here the problem is that if you do not use select, 2015 is selected as standard. How do I indicate that a chela cannot be 1-16 years old.

If it is possible to find out and display a message with yii2 rules, you can use them.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
totudub, 2015-12-04
@totudub

Write your validator in rules, in which you will compare dates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question