angularjs dateicker-使用日期预填充或填充输入/如何设置ui引导日期选择器的日期值

ifsvaxew  于 2021-09-29  发布在  Java
关注(0)|答案(0)|浏览(248)

我的用例是两个日期选择器。第一个将导致从日期选择器中选择日期值。之后,我想在另一个日期选择器中确认此日期值。
html

<div class="col-sm-6 col-md-6 col-lg-6">
                                <div class="control-group">
                                    <label
                                        class="control-label label-text" for="startLossDateTime">When did the
                                        incident occur?
                                    </label>
                                    <div class="controls"
                                         ng-class="{'has-success':emailClaimInitForm.startLossDateTime.$valid && emailClaimInitForm.startLossDateTime.$dirty, 'has-error':emailClaimInitForm.startLossDateTime.$invalid && emailClaimInitForm.startLossDateTime.$dirty || submitted && emailClaimInitForm.startLossDateTime.$error.required}">
                                        <div class="input-group">
                                            <input
                                                class="form-control bold-text input-background-color"
                                                ng-model="claimInitiationPayload.sections.loss.dateTime"
                                                id="startLossDateTime"
                                                required
                                                uib-datepicker-popup="yyyy-MM-dd HH:mm:ss"
                                                is-open="dateFieldOpeneddateField"
                                                placeholder="Select a date"
                                                title="Please enter the start date of loss"
                                                name="startLossDateTime"
                                                type="text">
                                            <div class="input-group-btn">
                                                <button type="button" class="btn btn-default"
                                                        ng-click="opendateField($event)">
                                                    <i class="glyphicon glyphicon-calendar">
                                                    </i>
                                                </button>

                                            </div>
                                        </div>
                                    </div>
                                    <div
                                        ng-show="emailClaimInitForm.lossDateTime.$invalid && emailClaimInitForm.lossDateTime.$dirty">
                                        <strong class="validation-warning">Only numeric characters
                                            allowed</strong>
                                    </div>
                                </div>

如果我复制这个html,在选择日期后,它应该显示在第二个输入中。但事实并非如此

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题