简体   繁体   English

Datepicker继续为我重置其他输入字段

[英]Datepicker keep reseting me the other input fields

I have an input field text with a datapicker below: 我有一个下面带有数据选择器的输入字段文本:

 <input type="type" class="form-control" name="cost" v-bind:value="cost">
    <div class="form-group col-md-8">

       <label class="col-md-2 control-label" >From:</label>
        <datepicker  v-model="period.from" :format="period.format" id="vue-time-picker"
                    :clear-button="true"
                    name="from"></datepicker>

       <br>
       <label class="col-md-2 control-label" >To:</label>
        <datepicker v-model="period.to" :format="period.format" id="vue-time-picker"
                    :clear-button="true"
                    name="to"></datepicker>
    </div>

I am using vuejs-datepicker and all the time I fill the first field and as soon as I select a date it will reset me the input text to old value ? 我一直在使用vuejs-datepicker,并且一直都在填写第一个字段,一旦选择了日期,它将输入文本重置为旧值吗?

Does anyone has a solution for this ? 有人对此有解决方案吗?

duplicated id value id="vue-time-picker" 重复的ID值id="vue-time-picker"

input type="type" seems wrong too input type="type"似乎也是错误的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM