I would like to be able to save a value from a button into a session variable on click. fyi- The button does not submit anywhere. I hope I am using the terminology correctly, if not please correct me.
Here's what I have:
<button class="button button-small button-stable" data-ion-modal="_Modal" value="November-26-2015">'26'</button>
Template.calendar.events({
'click .button' : function() {
var value = this.value;
Session.set( "DateEditing", value);
var clickedDateValue = Session.get('DateEditing');
}
});
Try this:
Template.calendar.events({
'click .button' : function(event, template) {
var value = event.currentTarget.value;
Session.set("DateEditing", value);
}
});