0

I have a simple datepicker

<input type="date">

How to enable only some given specific dates on this datepicker

array = [{"date":"06-April-2021"},{"date":"11-April-2021"},{"date":"17-April-2021"}]

There were some solutions with jquery but how to achieve this through javascript

Yaditya
  • 47
  • 7
  • When you use jQuery datepicker, why don't use jQuery ? – 4b0 Jul 24 '21 at 06:10
  • if you're using an html5 date element your control is limited to min and max date - https://stackoverflow.com/questions/17182544/disable-certain-dates-from-html5-datepicker – Kinglish Jul 24 '21 at 06:15

1 Answers1

0

HTML datepicker supports only min/max attribute. You might want to consider other date picker controls such as bootstrap

Bharat
  • 1,192
  • 7
  • 14
  • This isn't an answer. It's a comment – Kinglish Jul 24 '21 at 06:17
  • I think if the answer of question decided based on length then yes it's comment. However for the question it's answer for sure :). As a practice if it needs to removed from answer and moved as comment, I would gladly do that. At times when users are looking for answer on SO, the miss comments while the correct answer would be hidden in comments – Bharat Jul 24 '21 at 06:21