This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hello I'm writting my first plugin. I need to set up a duration field in backend, so I chose type: datepicker mode: time However when I save my model it adjusts to my timezone. So if I mark a 30min duration it is saving as 03h30min How can I disable timezone adjustment only for this field or store duration in other way?
Thank you
Found it
Datepicker has a property "ignoreTimezone" that it's default is "false" So all I had to do was set ignoreTimezone: true on myPlugin\models\myModel\fields.yaml
Hint for other noobs like me: I found the answer not googling it, but reading datepicker's code at root\modules\backend\formwidgets
1-2 of 2