L
L
ligisayan2019-03-25 17:00:59
JavaScript
ligisayan, 2019-03-25 17:00:59

How to limit input mask values ​​in bootstrap calendar field?

Hello!
There is a calendar with datapicker library under bootstrap 4. . Now I want to configure the convenience of manual input as well.

Interested in:
1) how to make placeholder be dd/mm/yyyy and not 01/01/1970 . It is now either correct or not correct after updating the page - I don’t know what it depends on.
2) Added a jquery.maskedinput mask , but it does not limit the input numbers - how to prevent the user from entering a date greater than the maximum for the day (31), month (12), year (2099) ?

UPD: defaultDate: new Date(0) I want the century range 1900-1990 to be displayed by default , not 2000-2090


Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentin, 2019-03-25
@romanko_vn

1. Remove defaultDate: new Date(0)
2. Even if you entered 32/10/2019 in the field, then when focus is lost, this field becomes default

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question