You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand Materialize uses pickadate.js under the covers. Having checked its API I see there are a range of event callbacks available:
How can I apply these to the datepicker in Angular 2? I got as far as grabbing the datepicker through
var $input =$(this.el.nativeElement); // We grab a reference to the datepicker here
var picker = $input.pickadate('picker');
but there's not a great deal I can do from there. I actually want to close the datepicker on selection and found that an attribute 'closeOnSelect' exists: http://amsul.ca/pickadate.js/date/
Unfortunately, placing this in [materializeParams] doesn't seem to work.
var $input = $(this.el.nativeElement); // We grab a reference to the datepicker here
var picker = $input.pickadate('picker');
picker.on('close', function() {
//...
})
Hi,
In short, I have 2 questions.
Longer explanation:
I understand Materialize uses pickadate.js under the covers. Having checked its API I see there are a range of event callbacks available:
How can I apply these to the datepicker in Angular 2? I got as far as grabbing the datepicker through
but there's not a great deal I can do from there. I actually want to close the datepicker on selection and found that an attribute 'closeOnSelect' exists: http://amsul.ca/pickadate.js/date/
Unfortunately, placing this in [materializeParams] doesn't seem to work.
One more thing, I noticed the Datepicker sample here http://angular2-materialize.surge.sh/#/datepicker
does not suffer from this bug whereas Materializes (plus mine) does... can you think of any reasons why? I thought the implementation between both would be near identical...
As always, thank you!
Pieris
The text was updated successfully, but these errors were encountered: