Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

After upgrade to angularjs 1.6.2 calendar does not render #191

Open
pabramowitsch opened this issue Apr 6, 2017 · 5 comments
Open

After upgrade to angularjs 1.6.2 calendar does not render #191

pabramowitsch opened this issue Apr 6, 2017 · 5 comments

Comments

@pabramowitsch
Copy link

pabramowitsch commented Apr 6, 2017

On a previously working app, after upgrading angularjs, animate, aria and messages to v1.6.2 the calendar in mdpDatePicker no longer renders. The mdpPicker is located on another $mdDialog.

The popup opens with the correct date, but displays the unrendered angular reference:
{{ calendar.date.format("MMMM YYYY") }}

followed by blank space

The html:

`<md-input-container class="datepickerdemoBasicUsage" flex="30">
	<mdp-date-picker mdp-format="MM/DD/YYYY" name="ep_start_date" 
         mdp-min-date='minStartDate'  mdp-max-date='maxStartDate' 
         required="" mdp-placeholder="Episode Start" ng-model="tester">
       </mdp-date-picker>
      <div class="errors" ng-messages="newCase.ep_start_date.$error" 
           ng-if="newCase.$dirty">
           <div ng-message="required">Required</div>
	   <div ng-message="format">Invalid format</div>
	    <div ng-message="minDate">Min date</div>
	     <div ng-message="maxDate">Max date</div>
     </div>
   </md-input-container>`

I thought it might be an animation issue, so tried adding delay in the timeout function and even trying an $apply() within the callback, but no luck.

btw... with AngularJS and mdDialogs stacked up
The cancel problem of a two level dialog was not solved by parenting the first dialog which used to work under Angular1.4.x, or changing skipHide: true, to multi: true, But by changing mdpPicker's cancel to call $mdDialog.hide(null), it fixed at least that problem

Any suggestions about rendering the calendar on the mdpPicker popup?

@ajayreddy56
Copy link

Facing same issue Bro.After upgrading the angular.
How to resolve this @pabramowitsch
Please look into the issue @alenaksu

@ajayreddy56
Copy link

resolve immediately @alenaksu

@jazdw
Copy link

jazdw commented May 8, 2017

@ajayreddy56 that's more than a little rude. Why don't you fix it yourself and submit a pull request.

This is caused by mdPickers using bindings in the constructor, the code should be moved to an $onInit function. In the meantime you can git mdPickers working in AngularJS 1.6.x by setting $compileProvider.preAssignBindingsEnabled(true);

@jazdw
Copy link

jazdw commented May 8, 2017

In fact there is already a PR which addresses this issue #168

@dpoetzsch
Copy link

I integrated angular 1.6 support in my fork https://github.com/dpoetzsch/md-pickers. See #192 for details on the fork.

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

No branches or pull requests

4 participants