How to create dynamic datetimepicker value?
问题 My HTML code like this: $(function () { $('#datetimepicker').datetimepicker({ minDate: moment().startOf('minute').add(300, 'm'), }); $("#btnSubmit").click(function() { value = document.getElementById('datetimepicker').value; console.log(value) }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js