输入类型 datetime-local 在 Firefox 中不起作用

Nid*_*mar 23 html javascript firefox

我有一个 datetime-local 输入类型,它在 chrome 中工作正常,但是当我尝试在 Firefox 中运行同一页面时,它显示文本框而不是 datepicker。我尝试过使用现代工具但问题仍然存在谁能告诉我怎么能日期时间本地问题可以在 Firefox 中修复。

<div class="form-group" ng-class="{'has-error': vm.basicInfoForm.validFrom.$invalid && (vm.basicInfoForm.validFrom.$dirty || vm.basicInfoForm.$submitted)}">
               <label translate >.NEW.STARTDATE</label>
               <input type="datetime-local" name="validFrom"  class="form-control" name="fromdate" ng-model="vm.basicInfo.validFrom"/>
               <span class="help-block error-block basic-block" translate>.NEW.CHECKDATE</span>
            </div>
Run Code Online (Sandbox Code Playgroud)

Pab*_*zos 20

不支持,检查他们的文档https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Browser_compatibility

  • 考虑到他们自己的页面上有一篇关于该内容以及如何使用它的文章,这很搞笑:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local …他们应该确实有这样的东西实现,因为它是一个非常基本的 html5 功能。 (62认同)
  • 只有 2 个主要浏览器不受支持。它是 Firefox 和 Safari。这个话题是从2018年开始的。嗯。 (3认同)

Scr*_*t47 9

官方错误跟踪器上已针对此问题创建了一份报告。它最近被关闭(撰写本文时 < 1 个月前),状态RESOLVED FIXEDFirefox Nightly 版本 (93.0a1 2021-09-02)

考虑到上述情况,我们应该会很快看到此更新推出。

datetime-local每晚构建中的示例:

日期时间本地示例

Nightly 构建中可见选择器的示例:

可见选择器的示例

阅读材料

发布时间表

  • 我没看到时间。这应该是正确的日期和时间 (7认同)
  • @Jar Me 要么。这似乎是一个不完整的实现。我可以在 Edge 中看到小时-分钟选择器,但在 Firefox 中看不到 (3认同)