smalot / bootstrap-datetimepicker

Both Date and Time picker widget based on twitter bootstrap (supports Bootstrap v2 and v3)
http://www.malot.fr/bootstrap-datetimepicker/
Apache License 2.0
3.49k stars 1.65k forks source link

Insert Today Date in Input Field without native javascript during page load #653

Open vibs2006 opened 7 years ago

vibs2006 commented 7 years ago

I'm using following options to initialize my datepicker

var currentDate = new Date();       
        $("#datetimepicker2").datetimepicker({
            format: "yyyy-mm-dd",
            showMeridian: false,
            autoclose: true,
            minView: 2,
            endDate: currentDate,
            todayHighlight: false,
            initialDate: currentDate,
            todayBtn: true
        });

However in the Input Text Field #datetimepicker2 I'm still text value as blank!

Please Help that how can I initialize the input value by using datetimepicker or shall I use native javascript function to manually append current date in the input field.