Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moment-timezone-picker

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment-timezone-picker

A simple angular moment timezone picker

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by20.58%
Maintainers
1
Weekly downloads
 
Created
Source

MomentTimezonePicker

NPM

npm version

Versions

AngularVersion
81.x.x
70.x.x

Dependencies

For select input @ng-select/ng-select For time core moment-timezone

Getting started

Step 1: Install

NPM
npm i moment-timezone-picker --save

Step 2: Import the MomentTimezonePickerModule

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { MomentTimezonePickerModule } from 'moment-timezone-picker'; //add this

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MomentTimezonePickerModule //add this
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Step 3: Add in component html

<ng-moment-timezone-picker (onselect)="yourFunc($event)" 
                            [customPlaceholderText]="yourText">
</ng-moment-timezone-picker>

Step 4: Configuration

Inputs
InputTypeDefaultRequiredDescription
[customPlaceholderText]stringChoose...noAllows you to localize the placeholder text.
[customNotFoundText]stringNo zone foundnoAllows you to localize not found text
[getUserZone]booleanfalsenoAllows you to guess user timezone. If true also emits value on init.
[setZone]stringnullnoAllows to set default zone on init. Example America/Los_Angeles.
Outputs
OutputDescription
(onselect)Returns object with 5 keys (TZone)
Object: TZone
FieldTypeExample
abbrstringGMT
groupstringEurope
nameValuestringEurope/London
timeValuestring+00:00
namestringEurope/London (+00:00)

Contributor

Keywords

FAQs

Package last updated on 09 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc