A
A
Alexander2014-07-17 12:19:14
HTML
Alexander, 2014-07-17 12:19:14

How to make available/unavailable dates in html date type field?

There is a list of dates of the form:
12/01/14
12/04/14
12/08/14
12/12/14
12/16/14 12/20/14
And
there is an input date field - in which the calendar. I need to make sure that the user can select a specific date from a predefined list of dates through the calendar.
I would be very grateful if someone could point me to a possible solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Lobanov, 2014-07-17
@ghost1k

<input type="date" min = "2014-12-01" max = "2014-12-20" step = "4"/>

Accordingly, from 1 to 20 with a step of 4. But your first date is 1 number, so next. only 5 turns out.
If the list is not at a certain interval, then I advise you to use the jquery datepicker, especially since the date type is still not supported by many.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question