我如何通过code打开日期类型的输入窗口 [英] How do i open the window in a date type input through code

查看:119
本文介绍了我如何通过code打开日期类型的输入窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<span>{{t.date}}</span>
<input type='date' ng-model='t.date' id='tdate'/>

当用户点击输入​​图标,它开辟了日期窗口,一切工作都正确的,但我希望用户能够点击跨度,并为它也是开放日期窗口眼下。
之后,控制面板上的时间我还没有发现的事件打开了输入。

Right now when the user clicks the input icon it opens up the date window and everything works all right but I want the user to be able to click the span and for it to also open up the date window. After hours on the control panel i still haven't found an event the opens up the input.

在此先感谢您的帮助。

推荐答案

由于斯利姆说你不用管的程序员。他是真正的<一个href=\"https://developers.google.com/web/updates/2012/08/Quick-FAQs-on-input-type-date-in-Google-Chrome\"相对=nofollow>阅读本

As Slim said you don't have control as programmer. He's true Read This

但也有一些情况下,我们不能为理由做新的实现,因此,对于这样的情况,你可以把它的工作使用CSS。你需要做的仅仅是应用CSS规则的输入,它涵盖了您span元素的方式。使颜色和背景颜色为透明,这样就不会被用户看到,当用户点击跨度,它实际上执行输入日期点击。

However there are some situation where we can't do new implementation for a reason so for such situation, you can make it work using CSS. What you need to do is just apply css rule to your input in a way that it covers your span element. Make color and background-color as transparent so it won't see by the user but when user click on span it actually execute input date click.

希望工程。

这篇关于我如何通过code打开日期类型的输入窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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