最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to learn creating a datepicker - Stack Overflow

programmeradmin3浏览0评论

I just would like to ask for some suggestions on how or where I could learn on how to create a datepicker in html without using bootstrap or any built/finished javascript and css. I would like to learn from scratch on how some developers created these.

The one that when you clicked on the textbox, the datepicker would appear under the textbox and then when I clicked on a specific date, it would generate automatically on the textbox with a default format. I would like to practice creating one for a birthday field.

Thanks a lot! :D

I just would like to ask for some suggestions on how or where I could learn on how to create a datepicker in html without using bootstrap or any built/finished javascript and css. I would like to learn from scratch on how some developers created these.

The one that when you clicked on the textbox, the datepicker would appear under the textbox and then when I clicked on a specific date, it would generate automatically on the textbox with a default format. I would like to practice creating one for a birthday field.

Thanks a lot! :D

Share Improve this question asked Apr 6, 2017 at 3:38 KentKent 4661 gold badge6 silver badges11 bronze badges 4
  • 2 why reinvent the wheel? – madalinivascu Commented Apr 6, 2017 at 3:50
  • What do you mean sir? – Kent Commented Apr 6, 2017 at 5:03
  • Why do you urge to create a datepicker where there are plenty of them available for free. If you need to customize it then there are tutorials as well. If you really really need to learn how it works then hope this would help you. – Kakashi Hatake Commented Apr 6, 2017 at 5:17
  • 8 Because I would want to learn how the datepicker is created and how it works. Although there are free datepickers that are ready for download, I would just want to learn the most basic or simple datepicker. I already tried that tutorial but I am referring to the textbox that when clicked, the datepicker will appear. Thanks by the way. :D – Kent Commented Apr 6, 2017 at 5:34
Add a ment  | 

2 Answers 2

Reset to default 15

To create your own Datepicker first you need to understand the Javascript Date Functions This functions is what you'll be using for most of the time in date handling.

See this sample code I made, it's not near perfect but it get the jobs done if I'd say

My Date Picker https://www.w3schools./code/tryit.asp?filename=FED216E6BIIJ

here <input type="date" name="date">

发布评论

评论列表(0)

  1. 暂无评论