JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://code.htmlhifive.com/h5.css">
<script src="https://code.htmlhifive.com/ejs-h5mod.js"></script>
<script src="https://hifive.github.io/hifive-res/fw/current/h5.dev.js"></script>
<script src="https://hifive.github.io/hifive-ui-library/hifive-ui-library/WebContent/components/calendar/src/CalendarController.js"></script>
<link rel="stylesheet" href="https://hifive.github.io/hifive-ui-library/hifive-ui-library/WebContent/components/calendar/src/CalendarController.css">
<div id="container"></div>
<p>
<button id="marker">マーカーをつける</button>
</p>
JavaScript
$(function(){
var disableDates = [];
var mainController = {
__name : 'h5.ui.container.MainController',
calendarController: h5.ui.components.Calendar,
__meta : {
calendarController: {
rootElement: '#container'
},
},
__init: function(){
this.$find(".select:first").attr("checked", true);
},
'#marker click': function(context, $el) {
var dates = this.calendarController.getSelectedDate();
for (var i=0; i<dates.length; i++) {
this.calendarController.setMarker(dates[i], true);
}
},
};
h5.core.controller('body', mainController);
});