简体   繁体   English

如何在我的angular4应用程序中使用输入类型日期? 当前浏览器是mozilla firefox

[英]how to use input type date in my angular4 app? current browser is mozilla firefox

I'm currently working in Angular4 app. 我目前在Angular4应用中工作。 And I used input type date, it is working in chrome, but not working in mozilla. 我使用输入类型date,它在chrome中工作,但在mozilla中不工作。 How to solve this issue? 如何解决这个问题? I thought I can use jQueryUi datepicker, but it makes some issues as well. 我以为我可以使用jQueryUi datepicker,但这也会带来一些问题。

Any ideas about this? 有什么想法吗?

You could use the Angular Material Datepicker its worked for me both on chrome and firefox with no issues. 您可以在chrome和firefox上使用对我有用的Angular Material Datepicker ,没有问题。 日期选择器

Solved this issues using jQuery Ui datepicker. 使用jQuery Ui datepicker解决了此问题。 Like this. 像这样。

 import { Component, AfterViewInit, ElementRef, ViewChild } from '@angular/core'; ... declare var $: any; export class MyClass implements AfterViewInit { @ViewChild('datepicker1') el1: ElementRef; ... ngAfterViewInit() { $(this.el1.nativeElement).datepicker(); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何禁用默认元素<input type="date" >在 Mozilla 火狐上 - How can I disable default element in <input type="date" > on mozilla firefox <input type=“date”>不在mozilla工作 - <input type=“date”> is not working in mozilla 如何在另一个组件中使用一个组件的输入-Angular4 - How to use the input of one component in another - Angular4 Angular4应用程序无法在Edge和IE浏览器中运行 - Angular4 app not working in Edge and IE Browser 在React Native应用上共享突出显示的文本时,如何从浏览器(Chrome,Mozilla,Firefox等)获取URL? - How to get URL from a browser(Chrome, Mozilla, Firefox…) while sharing highlighted text on react native app? 如何在Mozilla Firefox中的只读输入类型文本框中不显示游标 - How not to display Cursor in a read only input type text box in Mozilla Firefox 如何在Angular4中编写FormBuild for Dynamic输入? - How to write the FormBuild for Dynamic input in Angular4? 如何在 Angular/Angular2/Angular4 应用程序中导入和使用particles.js - How to import and use particles.js in an Angular/Angular2/Angular4 app 如何绑定 Angular4 组件的输入参数 - How to bind an input parameter of an Angular4 component 如何使用输入类型日期动态地只允许从当前日期起一年? - How can I use input type date to dynamically only allow for one year from current date?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM