bootstrap datetimepicker和时刻弃用 [英] bootstrap datetimepicker and moment deprecation

查看:79
本文介绍了bootstrap datetimepicker和时刻弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,在我正在构建的应用程序上,我正在使用一个使用时刻的引导程序datetimepicker。我一直在收到关于片刻贬值的警告,现在它不像昨天那样工作,我认为它与它有关...



应该怎样我做?我喜欢它的样式...

Hey guys, on an application I'm building I'm using a I have bootstrap datetimepicker which uses moment. I've been getting a warning about moment's deprecation and now it's not working like it was yesterday and I think it has something to do with it...

What should I do? I liked the way it was...

推荐答案

当必须将字符串解析为日期而不知道输入格式是什么时,会引发警告。如果您通过format属性指定输入格式,则deprication警告将消失。

您应该能够通过datetimepicker的文档找到如何执行此操作。
The warning is caused when moment has to parse a string to a date without knowing what the input format is. If you specify the input format, through the format property, the deprication warning will dissapear.
You should be able to find out how to do this via the documentation of datetimepicker.


这篇关于bootstrap datetimepicker和时刻弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆