当前位置:Gxlcms > JavaScript > timepicker在angular中如何转化为时间戳?

timepicker在angular中如何转化为时间戳?

时间:2021-07-01 10:21:17 帮助过:15人阅读

这篇文章主要介绍了bootstrap timepicker在angular中取值并转化为时间戳的方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

上一篇我们讲到angular对于timepicker的一个封装后的插件,但是由于angular的版本必须是v1.2.30以上的。对于有些大型系统,一时升级angular的版本实在耗费时间。那么可以用这种方法来取值。

页面上的时间格式是这样的:

文件引入

'/bootstrap-datetimepicker.min.css',
'/bootstrap-datetimepicker.min.js',
'/bootstrap-datetimepicker.zh-CN.js',//中文包

html

<p class="input-group date form_datetime" data-date-format="yyyy-mm-dd hh:ii:ss" data-link-field="dtp_input1" id="effStartDate"> //设置时间格式为 yyyy-mm-dd hh:ii:ss 。设置ID为 effStartDate
<input class="form-control" size="16" type="text" value="" readonly> 
    <span class="input-group-addon">
      <span class="glyphicon glyphicon-remove"></span>
    </span> 
    <span class="input-group-addon">
      <span class="glyphicon glyphicon-th"></span>
    </span> 
</p>

js:

以上就是timepicker在angular中如何转化为时间戳?的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行