angular-datepicker在ngDialog中不起作用

时间:2015-03-23 11:34:12

标签: javascript angularjs ng-dialog

我使用https://github.com/likeastore/ngDialoghttps://github.com/alongubkin/angular-datepicker

而angular-datepicker不起作用

ngDialog.open(
        { //

            template: '<input type="text" pick-a-date="date" is-open="true" placeholder="Select Date" />{{date}}',

            plain: true,
        })

但是当它在ngDialog

中使用时,angular-datepicker效果很好

的jsfiddle:https://jsfiddle.net/jediserg/jfsuymsv/9/

已更新我将angular-datepicker更改为jquery datepicker,但它无法正常工作。但我通过在创建

时设置超时来修复jquery datepicker
 window.setTimeout(function () {
                self.dp = $( "#lesson-date" ).datepicker({dateFormat: "yy-mm-dd"});        
            }, 100);

但是我可以用angular-datepicker做什么以及为什么所有选择器都不起作用?

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题。 问题是,datepicker工作正常,但你无法看到它。 ngDialog css-class的z-index为10000,而datepicker让它只有5000。 如果将z-index更改为1000,则应显示datepicker。至少这解决了我的pikaday datepicker的问题。