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 does not re-open after selecting a date.  #2540

@zackarychapple

Description

@zackarychapple

I have multiple datepickers on my page and am having trouble getting them to work as expected. They all open fine and allow for selecting a date without issue. However after selecting the date the datepicker will no longer open for that given element. I have included both the HTML and JS I am using with the datepicker.

How can I make it so the datepicker can be opened more than once for any given element.

<input type="text" ng-model="myOjbect.dateOfBirthStr" datepicker-popup="MM/dd/yyyy"
                           is-open="dateOfBirthStrOpened"
                           name="dateOfBirthStr" id="dateOfBirthStr" class="form-control" close-text="Close">
<span class="input-group-addon" ng-click="openDatepicker($event, 'dateOfBirthStrOpened')">
    <i class="ss-icon ss-calendar"></i>
 </span>
  $scope.openDatepicker = function ($event, elementOpened) {
    $event.preventDefault();
    $event.stopPropagation();

    $scope[elementOpened] = !$scope[elementOpened];

  };

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions