Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created February 14, 2017 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/36f435678e40d38c840806a4283f1264 to your computer and use it in GitHub Desktop.
Save goofmint/36f435678e40d38c840806a4283f1264 to your computer and use it in GitHub Desktop.
8.md
$(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);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment