g00fy- / angular-datepicker

calendar and datepicker directives for angular
MIT License
719 stars 420 forks source link

Don't work in New Chrome (>=v.45) #152

Open ottodranik opened 9 years ago

ottodranik commented 9 years ago

Hi! After update to new Chrome version (from v.45 and more) date-picker has a very strange bug.

You click on input tag with directive -> the modal window with date-picker show -> you press one of the arrow buttons to go to another month -> you get an absolutely clear (empty!) modal window with no date-picker controls (days, months, arrows etc).

With development-console I see that month changed and all controls actually is present. And I see that "ng-hide" or something like that isn't present at all. But it still isn't show in modal window. Just clearly (empty) modal window.

asafl commented 9 years ago

I also have this issue, I have the latest build.

sebastiangrebe commented 9 years ago

I am using chrome v.45 too but I do not have the error. Maybe you can post how you have setup the input just to reproduce it?

asafl commented 9 years ago

HTML:

<div class="dropdown daterange">
    <a class="dropdown-toggle pointer" data-toggle="dropdown">
        {{datePicker.startDate | date:'dd/MM/yy'}} - {{datePicker.endDate | date:'dd/MM/yy'}} <span class="caret"></span>
    </a>
    <div class="dropdown-menu" ng-click="$event.preventDefault();$event.stopPropagation()">
        <div date-range start="datePicker.startDate" end="datePicker.endDate"></div>
    </div>
</div>

JS:

var initial_start_date = moment().subtract(3, 'months').startOf('day');
var initial_end_date = moment().subtract(1, 'days').startOf('day');
$scope.datePicker.startDate = initial_start_date.toDate(); 
$scope.datePicker.endDate = initial_end_date.toDate(); 

Is this what you meant?

asafl commented 9 years ago

Anyone?

daniel-seitz commented 8 years ago

I got Chrome Version 46.0.2490.86 and it doesn't show the datepicker at all due to Cross-Origin request. Maybe that's the reason for you as well.

XMLHttpRequest cannot load file:///C:/Users/didadan/Downloads/
angular-datepicker-2.0.3/angular-datepicker-2.0.3/app/templates/datepicker.html. 
Cross origin requests are only supported for protocol schemes: http, data, 
chrome, chrome-extension, https, chrome-extension-resource.