Closed Nadoedalo closed 9 years ago
also the get_date function should return the origital Date object as second argument, as it is in callbacks.
For example - I have multiple calendars, one visible at a time and I want to show only one field with inputs.
Which callbacks do you need? (try to inspect $('...').data('pickmeup-options')
for methods you need)
This is crucial because I have different callbacks for days and month selection.
You can use $('...').data('pickmeup-options').view
to check what are you selecting right now
also the get_date function should return the origital Date object as second argument, as it is in callbacks.
Which callbacks do you mean?
initialize code :
this.$el.find('.switch_type .period').pickmeup({
flat : true,
mode : 'range',
calendars : 3,
format : 'Y-m-d',
separator : '‐',
max : new Date(),
min : max_date, //you see - I can't do new Date().addYear(-10) because it will be undefined
change : this.changeDate.bind(this),
locale : locale
});
I want to manually trigger that change callback WITH all data included. Something like $('.pickmeup').pickmeup.('trigger', 'change') - and get my callback applied
Try $('...').data('pickmeup-options').binded.update_date()
, this is the method from which change
event is called, also combination of get/set might work.
For example - I have multiple calendars, one visible at a time and I want to show only one field with inputs.
This is crucial because I have different callbacks for days and month selection.