如何更改jquery移动日期框组件的宽度和高度
我必须在 jquery 移动网页中为 datebox 组件提供特定的宽度和高度。所以我认为可以通过定义日期输入元素的宽度和高度来完成。不幸的是它没有成功。知道如何实现这一点吗? 。
提前致谢。
可以在此处查看示例代码 - http://jsfiddle.net/na6Be/
I have to give a particular width and height for datebox component in my jquery mobile webpage.So I thought it can be done by defining width and height for the date input element.Unfortunately it did not work out.Any idea how to achieve this?.
Thanks in advance.
A sample code can be seen here - http://jsfiddle.net/na6Be/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DateBox 插件目前不支持您在标记中使用简单属性所追求的功能。虽然主题正在开发中(根据文档),但当前更改插件动态创建的元素大小的唯一方法是将 CSS 替换为所需的尺寸。
然而,生成的标记中使用了相当多的类。检查元素将是你的朋友。首先要查看的地方是 .ui-datebox-container 类。默认宽度为 280px。顾名思义,这只是一个容器,因此简单地更改它不会影响 DataBox 的内容。快速浏览后,我想说您要查找的所有元素都在以“ui-datebox”开头的类中。
祝你好运!
The DateBox plugin doesn't currently support what you are after with a simple attribute in your markup. While theming is in the works (according to the documentation), the only current way that you can change the size of the elements that are dynamically created by the plugin is by replacing the CSS with your required dimensions.
However, there are quite a lot of classes used in the generated mark up. Inspect element will be your friend here. The first place to look will be the .ui-datebox-container class. This holds the default width of 280px. As the name suggests, this is just a container so simply changing this won't affect the contents of the DataBox. After a quick look, I would say all elements you are looking for are within a class beginning with "ui-datebox".
Good luck!