【问题标题】:Why is the 'Date' not append into the <div>?为什么“日期”没有附加到 <div> 中?
【发布时间】:2021-03-01 13:55:17
【问题描述】:

我正在使用引导程序 DateTimePicker,如您所见,“开始日期”能够将文本附加到 #shadow-root 中的 &lt;div&gt; 中,但“到期日期”无法这样做。 “开始日期”能够在页面加载后自动附加,如何将到期日期附加到 &lt;div&gt; 中,如“开始日期”?下面的代码是日期时间选择器的代码。

                     <div class="form-group row m-b-15">
                        <label class="col-form-label col-md-2">Start Date :</label>
                        <div class="col-lg-3">
                            <div class="input-group date" id="datetimepicker1vs" name="start_date">
                                <input type="text" name="start_date" class="form-control"
                                       value="{{date('d-m-Y H:i:s', strtotime($voucher->start_date))}}"
                                       placeholder="Select a Start Date"/>
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                            </div>
                        </div>

                        <label class="col-form-label col-md-2">Expiry Date :</label>
                        <div class="col-lg-3">
                            <div class="input-group date" id="datetimepicker1ve" name="expiry_date">
                                <input type="text" name="expiry_date" class="form-control"
                                       value="{{date('d-m-Y H:i:s', strtotime($voucher->expiry_date))}}"
                                       placeholder="Select an Expiry Date"/>
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                            </div>
                        </div>
                    </div>

【问题讨论】:

    标签: javascript datetimepicker bootstrap-datetimepicker


    【解决方案1】:

    Nvm 大声笑,我刚刚意识到我给出的格式与 bootstrap.js 中要求的格式不同

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-31
      • 1970-01-01
      • 2021-11-30
      • 2018-10-18
      • 2021-04-30
      • 2017-11-29
      • 1970-01-01
      • 2019-01-12
      相关资源
      最近更新 更多