Reputation: 1103
hi i am using monthpicker using bootstrap.
http://jsfiddle.net/k5zookLt/602/
<div class="form-group">
<label>Second check out:</label>
<input type="text" style="width:25%" class="form-control form-control-2 input-sm to" placeholder="Calender">
</div>
it gives me the output with the month number like 02/2017, but i need the month name like (February/2017) instead of month number. Please Help.
Upvotes: 0
Views: 1593
Reputation: 10548
Change
$('.to').datepicker({
autoclose: true,
minViewMode: 1,
format: 'mm/yyyy'
}).on('changeDate', function(selected){
To
$('.to').datepicker({
autoclose: true,
minViewMode: 1,
format: 'MM/yyyy' //Change Here
}).on('changeDate', function(selected){
Considering February Month as an example
format: 'MM/yyyy'
: February/2017format: 'M/yyyy'
: Feb/2017format: 'mm/yyyy'
: 02/2017format: 'm/yyyy'
: 2/2017Upvotes: 1
Reputation: 457
Change your date format to: format: 'MM/yyyy'
notes: use uppercase M instead of lowercase m
Upvotes: 3