Search code examples
phpsymfonysymfony-3.1

Allow more than 24 hours in Time Type field in symfony


I'm developing a Web App in symfony for an older desktop aplication, I have an entity Flight that has a field called delay. A delay could be for example: 35 hours and 35 minutes. Because is a newer version of an old system I have to keep the interface similar to the older system as much I can. So I need to show this field in the form as hours and minutes. I used TimeType Field and works just fine but not allows submit more than 24 hours. I wonder if there is a solution for this that allow me to render this field as hours and minutes. Thanks


Solution

  • Try this - DateIntervalType Field

    This field allows the user to select an interval of time. For example, if you want to allow the user to choose how often they receive a status email, they could use this field to choose intervals like every "10 minutes" or "3 days".