-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
37 lines (36 loc) · 900 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
enyo.kind({
name: "App",
kind: enyo.Control,
components: [
{
name: "calendar",
kind: "wijmo.wijcal",
settings: { monthCols: 1 },
onAfterSelect: "dateChanged",
onBeforeSlide: "beforeSlide"
},
{ name: "picked" },
{ kind: "Button", content: "Select Today", onclick: "selectToday"},
{ kind: "Button", content: "Unselect All", onclick: "unselectAll"}
],
create: function() {
this.inherited(arguments);
this.$.calendar.title = enyo.bind(this, "title");
},
dateChanged: function(inSender, date) {
this.$.picked.setContent(date.toString());
},
title: function(inSender) {
var date = this.$.calendar.getDisplayDate();
return(date.toString());
},
beforeSlide: function(inSender) {
return(true);
},
selectToday: function(inSender) {
this.$.calendar.selectDate(new Date());
},
unselectAll: function(inSender) {
this.$.calendar.unSelectAll();
}
});