【问题标题】:Error in angularui boostrap datepicker角度 ui 引导日期选择器中的错误
【发布时间】:2016-11-05 14:33:28
【问题描述】:

当 required 子句为 true 时,我有一个 datePicker,它的初始值为今天。当我留空时,出现此错误:+1: 错误:我未定义 q@http://localhost/SafeTravelClient/js/ui-bootstrap-tpls-1.3.3.min.js:8:6100this.init/http://localhost/SafeTravelClient/js/ui-bootstrap-tpls-1.3.3.min.js:8:9508

我猜它会尝试应用一些格式或其他东西并找到一个空值......

任何提示...

【问题讨论】:

  • 你在读那个值吗?请添加更多信息,添加您的 html 代码和您的功能
  • 寻求调试帮助的问题(“为什么这段代码不起作用?”)必须包括所需的行为具体问题或错误必要的最短代码在问题本身中重现它。没有明确的问题陈述的问题对其他读者没有用处。请参阅:How to create a Minimal, Complete, and Verifiable example

标签: angularjs datepicker


【解决方案1】:

这是我的html代码

                <div class="row">
                    <div class="col-xs-3">
                        <label class="control-label">Desde</label>
                        <p class="input-group">
                            <input type="text" 
                                   class="form-control" 
                                   uib-datepicker-popup="dd/MM/yyyy" 
                                   ng-model="dpDesde" 
                                   ng-change='dpDesde_Change()'
                                   is-open="popup1.opened" 
                                   ng-required="true" 
                                   close-text='Cerrar'
                                   clear-text='Limpiar'
                                   current-text='Hoy'
                                   datepicker-options="dateOptions"
                                   alt-input-formats="altInputFormats" />
                            <span class="input-group-btn">
                                <button type="button" 
                                        class="btn btn-default" 
                                        ng-click="openDatePop(1)">
                                    <i class="glyphicon glyphicon-calendar"></i></button>
                            </span>
                        </p>
                    </div>                        

【讨论】:

    猜你喜欢
    • 2014-12-20
    • 2016-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多