Reputation: 773
In html i want to show calendar to select date while clicking a text box. then we select a date from that calendar then the selected date will be display in that text box.
Upvotes: 15
Views: 212152
Reputation: 2019
yeah you will come across of various issues using HTML5 datepicker, it would work with some or might not be. I faced the same issue. Please check this DatePicker Demo, I solved my problem with this plugin. Its very good and flexible datepicker plugin with complete demo. It is completely compatible with mobile browsers too and can be integrated with jquery mobile too.
Upvotes: 1
Reputation: 5348
Starting with HTML5, <input type="date" />
will do just fine.
Demo: http://jsfiddle.net/8N6KH/
Upvotes: 22
Reputation: 13378
What you need is a jQuery UI Datepicker
Check out the demo and the source code.
Upvotes: 1
Reputation: 91
try to use jquery-ui
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script>
$(function() {
$( "#calendar" ).datepicker();
});
</script>
<p>Calendar: <input type="text" id="calendar" /></p>
Upvotes: 3
Reputation: 2584
You will need to use any javascript html calendar widget.
try this calendar view widget, just copy-paste some code shown in example there and thats it what you want.
Here is the link to Jquery Mobile date box - JQM datebox
Upvotes: 1
Reputation: 78971
jQuery Mobile has a datepicker too. Source
Just include the following files,
<script src="jQuery.ui.datepicker.js"></script>
<script src="jquery.ui.datepicker.mobile.js"></script>
Upvotes: 0
Reputation: 6996
You should read-up on jQueryUI Datepicker
Once you include the relevant jQuery UI library, it's as simple as,
Script:
$(function() {
$( "#datepicker" ).datepicker();
});
HTML:
<input type="text" id="datepicker" />
Pros:
Upvotes: 6