input type datetime-local is not working in firefox

前提是你 提交于 2020-07-18 10:01:19

问题


I have an input type of datetime-local which is working fine in chrome but when i try to run the same page in firefox it shows text box instead of datepicker.I have tried using modernizer but still the problem exist can anyone tell me how could the datetime-local issue can be fixed in 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>

回答1:


Is not supported, check their documentation https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Browser_compatibility




回答2:


Input type "datetime-local" is not supported in Firefox hence it shows a text box, in this case, you can use input type as "date".

As "datetime-local" shows the time as well and if you have the same requirement, you can use Input type "time" also to show the time.

I hope this helps.



来源:https://stackoverflow.com/questions/50567938/input-type-datetime-local-is-not-working-in-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!