So this is how I’m using my datepicker which has always worked with V4.
$('.datepicker').mobiscroll5().datepicker({
display:'bottom',
dateFormat: js_dateformat,
buttons:['clear'],
setOnDayTap:true,
responsive: {
small:{
display: 'center'
}
},
onClear: function(event,inst){
inst.hide();
}
});
But now that I’m using V5 some of these options are not working. For example, dateFormat. Did you guys remove the dateFormat option? Or is there a different way to specify a date format now?
Also there no longer seems to be a predefined “Clear” button, nor an onClear event.
And I don’t see a “setOnDayTap” option anymore, but I’m assuming this is enabled by default.
And lastly the styling is a bit messed up, on desktop especially. It’s almost like it’s confused between light and ark theme because the space outside of the calendar itself is black, but each day in the calendar has a light grey background as well as white text, making it difficult to read.
On mobile it’s better although I still think there might be something wrong with the styling as the header and footer of the calendar have white backgrounds while the calendar itself has a light grey background.
I should point out I’m using both V4 and V5 in my project, and this is how I’m including them.
<!-- Mobiscroll -->
<script src="plugins/mobiscroll5/js/mobiscroll.jquery.min.js"></script>
<script>
// Save mobiscroll 5 object before loading v4
window.mobiscroll5 = mobiscroll;
$.fn.mobiscroll5 = $.fn.mobiscroll;
</script>
<script src="plugins/mobiscroll/js/mobiscroll.jquery.min.js"></script>
<link href="plugins/mobiscroll5/css/mobiscroll.jquery.min.css" rel="stylesheet">
<link href="plugins/mobiscroll/css/mobiscroll.jquery.min.css" rel="stylesheet">