EXTJS:月/日选择器(即没有年份)
我目前在我的应用程序中使用 EXTJS EditorGridPanel,对于其中一个列输入,我要求用户能够选择月份和日期(无年份)。
我目前正在使用 DateField 来执行此操作,但我需要能够在 UI 中禁用它的“年份”方面。我不在乎“价值”最终是否与年份相关,我可以简单地忽略它。我搜索过是否有人做过这样的事情,但我唯一的发现是人们以这种方式仅显示月/年。
我的另一种选择是创建自己的自定义输入(带有月份和日期的组合框,其中日期组合根据月份而变化),但是,老实说,我没有那么多时间自己制作一个,因为我必须因为我以前从未创建过自定义输入扩展,所以请完成学习曲线。
-->所以我的大问题是,有人听说过现有的 EXTJS 月/日选择器吗?
任何帮助都将非常适合堆栈溢出的人们!
I am currently using a EXTJS EditorGridPanel in my application, and for one of the column inputs I require the user to be able to pick a month and day (no year).
I am currently using a DateField to do this, but I need to be able to disable the "year" aspect of it in the UI. I do not care if the "value" in the end has a year associated with it, I can simply disregard it. I have searched to see if anyone has done such a thing, but my only findings are people that way to show only Month/Year.
My other option is to create my own custom input (with comboboxes for month and day, where the day combo changes based on the month), however, I honestly don't have all that much time to make one myself as I would have to go through the learning curve since I have never created a custom input extension before.
--> So my big question then is, has anyone heard of an existing EXTJS month/day picker?
Any help would be much appropriated stack overflow peoples!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尽管我可能会创建自己的自定义组件来用作编辑器,但如果您不习惯这样做,您是否考虑过将“月”和“日”字段分解为网格列模型中的单独列?
另一种选择是向文本字段添加输入掩码(您需要在 cm 中指定一个输入掩码作为自定义编辑器)。我相信这是通过自定义 vtype 完成的。此输入掩码将强制用户以您指定的格式输入日期。
使用此方法将:
Although I would probably create my own custom component to use as the editor, if you're not comfortable doing that, have you considered breaking the Month and Day fields into separate columns in your grid column model?
Another option would be to add a input mask to the textfield (you'll need to specify one as a customEditor in your cm). I believe this is done via custom vtypes. This input mask would force the user to enter the date in the format that you specify.
Using this approach would :
试试这个
您的帖子似乎包含代码格式不正确的代码。请使用代码工具栏按钮或 CTRL+K 键盘快捷键将所有代码缩进 4 个空格。如需更多编辑帮助,请单击 [?] 工具栏图标。
try this one
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
尝试这样的事情:
我希望这会对您有所帮助。
Try something like:
I hope this will help you.