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

ng-bootstrap-datetime-angular-13

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-bootstrap-datetime-angular-13

Angular Bootstrap Date Time Picker

  • 0.1.33
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

ng-bootstrap-datetime-angular

Angular Date Time Picker

npm npm

This package supports Angular 8

Description


This picker is responsive design, so feel free to try it in your desktops, tablets and mobile devices.

Dependencies

@ng-bootstrap/ng-bootstrap ^1.0.0

moment ^2.24.0

bootstrap ^4.0.0

Live Demo

https://ng-bootstrap-datetime-angular.stackblitz.io

How to Use

  1. Install with npm:npm install ng-bootstrap-datetime-angular --save

  2. Add NgBootstrapDatetimeAngularModule to your @NgModule like example below

    import { BrowserModule } from "@angular/platform-browser";
    import { NgModule } from "@angular/core";
    
    import { AppComponent } from "./app.component";
    import { FormsModule, ReactiveFormsModule } from "@angular/forms";
    import { CommonModule } from "@angular/common";
    
    import { NgBootstrapDatetimeAngularModule } from "ng-bootstrap-datetime-angular";
    
    @NgModule({
      declarations: [AppComponent],
      imports: [
        BrowserModule,
        FormsModule,
        ReactiveFormsModule,
        NgBootstrapDatetimeAngularModule,
        CommonModule
      ],
      providers: [],
      bootstrap: [AppComponent]
    })
    export class AppModule {}
    
  3. Add your input into form like example below

    <form>
      <div [formGroup]="formGroup">
        <ng-bootstrap-datetime-angular
          inputDatetimeFormat="dd/MM/yyyy hh:mm a"
          formControlName="activeEndDate"
          name="activeEndDate"
        ></ng-bootstrap-datetime-angular>
      </div>
    </form>
    
  4. Connect to your component

    import { Component, OnInit } from "@angular/core";
    import { FormGroup, FormControl, Validators } from "@angular/forms";
    
    @Component({
      selector: "app-root",
      templateUrl: "./app.component.html",
      styleUrls: ["./app.component.scss"]
    })
    export class AppComponent implements OnInit {
      title = "Date";
      formGroup: FormGroup;
    
      ngOnInit() {
        this.formGroup = new FormGroup({
          activeEndDate: new FormControl(null, {
            validators: [Validators.required]
          })
        });
      }
    }
    

License

  • License: MIT

Author

Danilo Meneses Loaisiga

Keywords

FAQs

Package last updated on 27 Aug 2022

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