uib-datepicker-popup 在 firefox 或 safari 中不显示选择器

uib-datepicker-popup Not showing picker in firefox or safari

我一直在使用 Ui angular bootstrap 日期选择器,它工作正常....在 chrome.

事实证明,Firefox 和 safari 不会显示日期选择器。任何人 运行 以前都参与过这个。

我的HTML看起来像这样

 <p class="input-group">
       <input type="date" class="form-control" datepicker-popup ng-model="startDate" is-open="status.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" close-text="Close" />
 </p>

我的JS/Controller看起来像这样

   $scope.today = function () {
        $scope.startDate = new Date();
        $scope.startDate.setMonth($scope.startDate.getMonth() - 1);
        $scope.endDate = new Date();
        $scope.endDate.setMonth($scope.endDate.getMonth() + 1);
    };
    $scope.today();

    $scope.clear = function () {
        $scope.dt = null;
    };

    // Disable weekend selection
    $scope.disabled = function (date, mode) {
        return (mode === 'day' && (date.getDay() === 0 || date.getDay() === 6));
    };


    $scope.open = function ($event) {
        $scope.status.opened = true;
    };

    $scope.setDate = function (year, month, day) {
        $scope.startDate = new Date(year, month, day);
        $scope.endDate = new Date(year, month, day);
    };

    $scope.dateOptions = {
        formatYear: 'yy',
    };

    $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
    $scope.format = $scope.formats[0];

    $scope.status = {
        opened: false
    };

如前所述 这行得通。但是在 firefox 和 safari 中,它没有显示日期选择器,但它在 chrome.

中显示

不确定您使用的 UI Bootstrap 是哪个版本,但在 1.2.4 中,日期选择器标记如下所示:

<input type="text" class="form-control" uib-datepicker-popup ng-model="startDate" is-open="opened" ... />

在 FF 44 和 IE 11 中尝试了您的代码 - 我觉得没问题:http://plnkr.co/edit/deE1lR?p=preview