I overrided block date_widget like this: {% block date_widget %} {% spaceless %} {% if widget == 'text' %} {{ block('text_widget') }} {% else %} <div {{ block('attributes') }}> {{ date_pattern|replace({ '{{ year }}': form_widget(form.year), '{{ month }}': form_widget(form.month), '{{ day }}': '', })|raw }} </div> {% endif %} {% endspaceless %} {% endblock date_widget %}
and it works, but not very sophisticated way. i thought I can do it with pattern option, but no luck.. On May 23, 8:56 pm, Roger Webb <webb.ro...@gmail.com> wrote: > Not that I'm aware of. One possible solution would be to use Jquery > to render it invisible (or render the three fields individually and > set us the 'attr' parameter to mark it as invisible. Either way you > would set a default value for the day. > > Not sure if that's the best solution, but either one should work. > > On May 23, 1:35 pm, umpirsky <umpir...@gmail.com> wrote: > > > > > > > > > Can I render only year and month? Useful for credit cards for example. > > > On May 23, 8:11 pm, Roger Webb <webb.ro...@gmail.com> wrote: > > > > It's in the update doc and I'm having a severe case of the mondays. > > > > "Form: Renamed option value "text" of "widget" option of the "date" > > > type was renamed to "single-text". "text" indicates to use separate > > > text boxes now (like for the "time" type)." > > > > On May 23, 1:01 pm, Roger Webb <webb.ro...@gmail.com> wrote: > > > > > From the "date" field documentation: > > > > "The field can be rendered as a single text box or three select boxes > > > > (month, day, and year)." > > > > > I'm not seeing an option for "3 Text Boxes", it rendered as a single > > > > text field before which made it work nice with JQuery UI Datepicker. > > > > > Perhaps the documentation is out of date. Is there a way to make it > > > > render as one field? > > > > > Roger -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en