Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closeOnSelect doesn't work #111

Closed
chompunut opened this issue Nov 5, 2015 · 2 comments
Closed

closeOnSelect doesn't work #111

chompunut opened this issue Nov 5, 2015 · 2 comments

Comments

@chompunut
Copy link

I installed the latest commit (b26ca2e) to use the closeOnSelect option.
When I set closeOnselect = true, many bugs showing:

  1. The callback function is executed at the first loading the picker (this doesn't happen if I set closeOnSelect = false)

  2. It shows error TypeError: Cannot read property 'close' of undefined
    on ionic-datepicker.bundle.min.js at

a.dateSelected(y), a.$watch("date_selection.selectedDate", function (e, t) {
     a.closeOnSelect && (c(), "modal" === a.templateType.toLowerCase() ? a.closeModal() : a.popup.close())
})
  1. When I select a date or Today/Close button, the popup doesn't close but the callback function still be executed.

Here is my options settings:

$scope.datepickerObject = {
    closeOnSelect: true, 
    templateType: 'popup',
    to: new Date(),
    callback: function (date) { 
          console.log('callback');
    }
};

in html:

<div class="col" ionic-datepicker input-obj="datepickerObject">
        {{item.personbirthdate | bdate}}
</div>

Please help. Thank you in advance.

@rajeshwarpatlolla
Copy link
Owner

Please don't use that code. Its not yet tested. Please use the latest release.

@chompunut
Copy link
Author

@rajeshwarpatlolla Which is the latest release? I installed version 0.9.0 the closeOnSelect doesn't work as well. I set it to true but when I select a date, the popup doesn't close and no error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants