Skip to content

Commit

Permalink
Merge pull request #138 from avo-hq/timezone_improve
Browse files Browse the repository at this point in the history
improve timezone example on date time
  • Loading branch information
Paul-Bob authored Nov 21, 2023
2 parents 148fa08 + 05acca4 commit 75e00da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/2.0/fields/date_time.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ If nothing is selected, the browser's timezone will be used.
#### Possible values

[TZInfo identifiers](https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html).

```ruby{1,3}
field :started_at, as: :date_time, timezone: "EET"
# Or
field :started_at, as: :date_time, timezone: -> { record.timezone }
```
:::

:::option `picker_options`
Expand Down
6 changes: 6 additions & 0 deletions docs/3.0/fields/date_time.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ If nothing is selected, the browser's timezone will be used.
#### Possible values

[TZInfo identifiers](https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html).

```ruby{1,3}
field :started_at, as: :date_time, timezone: "EET"
# Or
field :started_at, as: :date_time, timezone: -> { record.timezone }
```
:::

:::option `picker_options`
Expand Down

0 comments on commit 75e00da

Please sign in to comment.