0

I am displaying a date time widget in a web page I am developing. By default time part only show hours and minutes. I need to show seconds too.

I have found that the date time wtdget has a variable called with_seconds, but I need to pass true from the form.

This is what I have but it did not work:

{{ form_widget(edit_form.fechhoramarcada, { 'attr': {'class': 'input-text no-border'}, 'with_seconds': true }) }}

Any help will be appreciated,

Thanks Jaime

1 Answer 1

2

You can change default options when you creating them.

$builder->add('fechhoramarcada', 'datetime', array(
    'with_seconds'    => true,
));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.