My Datetime picker works on the fist click, but if I click again in the input field again it shows the picker with the day field. How can I do this? Any help will be appreci
Try as follow
$('#dpRM').datetimepicker({
viewMode : 'months',
format : 'MM/YYYY',
toolbarPlacement: "top",
allowInputToggle: true,
icons: {
time: 'fa fa-time',
date: 'fa fa-calendar',
up: 'fa fa-chevron-up',
down: 'fa fa-chevron-down',
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
}
});
$("#dpRM").on("dp.show", function(e) {
$(e.target).data("DateTimePicker").viewMode("months");
});
REF :: GitHub