Score:1

Is there a way to limit the time zones available to the user to select from?

ng flag

We have a Drupal 9 site that has a Smart Date field with Time Zones. However, the time zone selection list is huge. We want to limit it to the four main US times zones. Is this possible?

enter image description here

Score:2
bd flag

I have never personally used that module, but according to their release notes, since version 3.0.0-rc1 this seems to be possible via the widget configuration:

Another step towards a stable release for the 3.0.x branch. This release brings improved Gin and Claro compatibility, cleanup up a variety of UI/UX issues, and fixes for notices being logged in a variety of circumstances. Also included here is a substantial amount of coding standards cleanup, in some cases for code going back to the 2.x branch. A new feature in the timezone widget is the ability to choose a subset of timezones to make available, so sites with a specific range of timezones to support can simplify the editor experience. There is now also improved views handling for recurring events, including the ability to expose a filter to view events recurring at a specific frequency (daily, weekly, monthly, etc.).

I also see relevant code for that in the current release branch src/Plugin/Field/FieldWidget/SmartDateTimezoneWidget.php

quantumized avatar
ng flag
Oh my, yes, it was an option in the time zone widget config. It just wasn't clear that I had to select "custom'. Thank you!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.