sfJQueryUIPlugin:没有新记录选择器
使用 Symfony 的每一天都是新的一天,但我很喜欢它! 今天早上我安装了sfJQueryUIPlugin
。它的依赖性非常小接受 themeRoller 样式。但是,它有两个问题:
[Feature_Request] 无法指定年份范围。默认情况下,它在字段值中显示年份周围 20 年的范围。例如。如果字段值为 1993-01-20,则范围将为 1983 至 2003。 ???有人找到出路了吗???
当字段为空时,DatePicker 不会出现,因此在创建新记录时不会显示。 为了解决这个问题,我尝试使用 $this->setDefault('date_of_birth',date(' ) 在日期输入字段(现在显示为
???在新记录创建过程中,有人面临这个选择器问题吗??? ???这也是设置默认值的正确方法吗???text
输入)中设置默认值Ymd'));
提前致谢。
Everyday is a new day with Symfony, but I'm loving it!
This morning I installed the sfJQueryUIPlugin
. It has very little dependencies & accepts themeRoller styles. However, it has 2 issues:
[Feature_Request] There is no way to specify the year range. By default, it shows a 20 year range around the year in the field value. eg. if field value is 1993-01-20, the range will be 1983 to 2003.
??? Has anyone found a way out???
The DatePicker does not appear when the field is empty, Thus it does not show up during new record creation.
To solve this, I tried setting up the default value in the date input field (which now appears as a text
input) using $this->setDefault('date_of_birth',date('Y-m-d'));
??? Is anybody facing this problem of picker now available during new record creation ???
??? Also is it the right way to set default value ???
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了在新的注册表单上获取日期选择器,我必须在表单的indexSuccess模板中包含javascripts(我的错)
至于年份范围,我修改了插件文件以包含附加参数
和将小部件设置为:
To get the date picker on the new registration form, I had to
include javascripts
in the indexSuccess template of my form (my fault)as for the year range, I modified the plugin file to include additional parameter
and setup the widget as: