I am using this plugin for Bootstrap, for date picking http://eternicode.github.io/bootstrap-datepicker/
I have it working here FIDDLE But I dont know if this is the right way to do it? Or if there's a way to do it through the plugin. I've tried to but I haven't got it right.
HTML:
Date: <input type="text" name="" class="datepicker" />
Jquery:
var d = new Date();
var month = d.getMonth()+1;
var day = d.getDate();
var output =((''+month).length<2 ? '0' : '') + month + '/' + ((''+day).length<2 ? '0' : '') + day + '/' + d.getFullYear();
$('.datepicker').datepicker();
$('.datepicker').val(output);
So I'm using Jquery to get the current date then I just fire the datepicker and then set the input value to the current date.
Any other ideas or suggestions will be appreciated!