ElementUi date and time selection tab <el-date-picker fails to select the time after 12:00

The function of selecting the time point in the project used the <el-date-picker in elementui, but the time point in the second half of the day was not selected.

Where the arrow below
Insert picture description here
to find the reason for a long time
because the el-date-pickerproblem attribute value-format tags are not used in the proper use of

<div class="block">
  <el-date-picker
      v-model="plan.runTime"
      class="date_picker"
      type="datetime"
      :picker-options="pickerOptions"
      value-format="yyyy-MM-dd hh:mm:ss"
      placeholder="选择日期时间">
  </el-date-picker>
</div>

Attribute value-format="yyyy-MM-dd hh:mm:ss" hh 12-hour clock HH 24-hour clock

So after using hh to format the time, it is a 12-hour system, so choose the afternoon time or 0~12

Guess you like

Origin blog.csdn.net/weixin_41822224/article/details/107579977
Recommended