Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery datepicker as popup?

Tags:

html

jquery

I am very new to jquery and only basic experience with javascript.

I would like an html input that when clicked would make the JQuery datepicker popup, which would fill in the html input. http://docs.jquery.com/UI/Datepicker

Can someone give me an example on how to accomplish this or give me a link that will point me in the right direction?

Thanks.

like image 223
Kyle Avatar asked Mar 04 '26 15:03

Kyle


1 Answers

Use the jQuery UI datapicker. It is very use to add and very easy for a user to use.

http://jqueryui.com/demos/datepicker/

<script>
$(function() {
    $( "#datepicker" ).datepicker();
});
</script>



<div class="demo">

<p>Date: <input type="text" id="datepicker"/></p>

</div><!-- End demo -->
like image 52
Nick Harrison Avatar answered Mar 07 '26 05:03

Nick Harrison



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!