JSPM

strapi-plugin-timezone-select

2.0.0-beta.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 229
  • Score
    100M100P100Q87766F
  • License MIT

A strapi custom field for selecting any timezone based on the moment.js timezones

Package Exports

    Readme

    Strapi plugin timezone-select

    A strapi custom field for selecting any timezone based on the moment.js timezones.

    Installation

    To install this plugin, you need to add an NPM dependency to your Strapi application:

    # Using yarn
    yarn add strapi-plugin-timezone-select
    
    # Using npm
    npm install strapi-plugin-timezone-select
    
    # Using pnpm
    pnpm add strapi-plugin-timezone-select

    Then, you'll need to build your admin panel:

    # Using yarn
    yarn build
    
    # Using npm
    npm run build
    
    # Using pnpm
    pnpm build

    Usage

    After installation you will find the timezone-select at the custom fields section of the content-type builder.

    timezone select screenshot

    Now you can select any country from the list. The Alpha-2 code of the selected timezone is stored in the database.

    timezone select screenshot

    Development

    Plugin creation

    This plugin was created using Strapi 5 plugin SDK

    # Using yarn
    yarn dlx @strapi/sdk-plugin init strapi-plugin-timezone-select
    
    # Using npm
    npx @strapi/sdk-plugin init strapi-plugin-timezone-select
    
    # Using pnpm
    pnpm dlx @strapi/sdk-plugin init strapi-plugin-timezone-select

    Start watch mode on the plugin

    To start working on your plugin

    • Open a terminal
    • Navigate to your plugin folder strapi-plugin-timezone-select
    • Run the following command
    # Using yarn
    yarn watch:link
    
    # Using npm
    npm run watch:link
    
    # Using pnpm
    pnpm watch:link

    To link the plugin to your Strapi project

    • Open a terminal
    • Navigate to your Strapi project
    • Run the following commands
    # Using yarn
    yarn dlx yalc add --link strapi-plugin-timezone-select
    yarn install
    
    # Using npm
    npx yalc add strapi-plugin-timezone-select
    npx yalc link strapi-plugin-timezone-select
    npm install
    
    # Using pnpm
    pnpm dlx yalc add --link strapi-plugin-timezone-select
    pnpm install
    

    This plugin is inspired by Chris Ebert's strapi-plugin-country-select