Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a calendar in HTML?

I have a web application that uses HTML and Javascript. I want to create a textbox that allows to user to enter in a keyword and submit it. I also want a little calendar icon next to the textbox so the user can click on it to popup a calendar to select a date as the keyword, and then submit that.

I have tried to implement Jcalendar and DatePicker but couldn't get either one working.

Is there something that I can use that will meet my needs? Thank you!

like image 528
amlane86 Avatar asked Dec 31 '25 16:12

amlane86


2 Answers

The easiest way is jQuery's Date Picker. One line of code....done.

<script type="text/javascript">
$( "#datepicker" ).datepicker();
</script>
like image 54
bpeterson76 Avatar answered Jan 02 '26 06:01

bpeterson76


Check out the jQueryUI datepicker: http://jqueryui.com/demos/datepicker/

like image 21
Francis Lewis Avatar answered Jan 02 '26 07:01

Francis Lewis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!