P
P
Pavel_Proca2017-01-13 18:53:39
JavaScript
Pavel_Proca, 2017-01-13 18:53:39

How to make a calendar with a date picker?

There are 3 input fields, of type radio. The fields are hidden, but each has its own label. I styled this label so that they look like buttons. When you click on the field, it changes color, and because it's a label for the input field, it works like a toggle. The first field - selects today's date. The second field - selects a date that will be tomorrow. But when you click on the third field, you need to highlight the calendar from which the user could choose any other date himself.

Somehow it should look like this
7b06b53c51414d6ba879543e1db33ff7.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2017-01-13
@Pavel_Proca

On the input we listen to the change event, if the desired field is activated, then we show
2008.kelvinluck.com/assets/jquery/datePicker/v2/de... (the library is very old, but I like it)

K
klinnov, 2017-01-13
@klinnov

https://bootstrap-datepicker.readthedocs.io/en/latest/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question