Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Datepicker is-open weirdness #3705

@johnnyreilly

Description

@johnnyreilly

Hi,

I've noticed that when setting is-open to true using an ng-click on the text element itself the date picker popup opens and closes as you would expect. However, if you move the ng-click to a separate button (the calendar glyph for instance) that this does not work.

This plunk demonstrates the problem.

The solution is the pass $event and then call $event.stopPropagation(). This is a behaviour is little unexpected and prompts these questions:

  1. Is this intentional / would someone be able to explain why this works the way it does?
  2. Would it be worth making the documentation spell this behaviour out a little more clearly? I've stumbled over this a couple of times now and ended up writing this up to remind myself in future. I can't be the only person this has confused...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions