gpt4 book ai didi

date - Kendo UI DatePicker 关于日期格式 yyyy-MM-dd 的警告

转载 作者:行者123 更新时间:2023-12-04 01:34:49 30 4
gpt4 key购买 nike

我的页面上有一个关于无效日期格式的警告,如下所示。该警告由 Kendo UI DatePicker 组件生成。我在网上找不到解决方案,我的应用程序是本地化的 pt-BR。如何解决这个问题。

<p>@(Html.Kendo().DatePicker().Name("periodoDocumento").Value(DateTime.Now))</p>

谷歌浏览器中的错误:
The specified value '06/07/2015' does not conform to the required format, 'yyyy-MM-dd'.

我必须使用日-月-年格式来满足我的客户需求。

最佳答案

我找到了解决方案:

@(Html.Kendo().DatePicker().Name("periodoDocumento").Value(DateTime.Now).HtmlAttributes(new { @type = "" }))

因此 jquery 将停止将此字段解析为默认格式的日期。

关于date - Kendo UI DatePicker 关于日期格式 yyyy-MM-dd 的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31252973/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com