Git Product home page Git Product logo

ngx-mydatepicker-th's Introduction

ngx-mydatepicker-th

Angular Directive date picker

Build Status npm

Description

This Project is Fork From ngx-mydatepicker Custom For Support Thai Year.

Thx. @kekeh for great component.

Installation

To install this component to an external project, follow the procedure:

  1. npm install ngx-mydatepicker-th --save

  2. Add NgxMyDPTHModule import to your @NgModule like example below

    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { MyTestApp } from './my-test-app';
    import { NgxMyDPTHModule } from 'ngx-mydatepicker-th';
    
    @NgModule({
        imports:      [ BrowserModule, NgxMyDPTHModule ],
        declarations: [ MyTestApp ],
        bootstrap:    [ MyTestApp ]
    })
    export class MyTestAppModule {}
  3. If you are using systemjs package loader add the following ngx-mydatepicker-th properties to the System.config:

    (function (global) {
        System.config({
            paths: {
                'npm:': 'node_modules/'
            },
            map: {
                // Other components are here...
    
                'ngx-mydatepicker-th': 'npm:ngx-mydatepicker-th/bundles/ngx-mydatepicker-th.umd.min.js'
            },
            packages: {
            }
        });
    })(this);

Usage

See from Original Repo Click

Attributes

See from Original Repo Click

custom attribute

Option Default Type Description
yearOffset 543 number For Display Year with by plus offset value Ex. A.D. Year 2017 Will Display is 2560 (2017 + 543).
  • Example of the options data (not all properties listed):
  myOptions: INgxMyDpOptions = {
      yearOffset: 543
  };

Functions

See from Original Repo Link

Callbacks

See from Original Repo Link

Development of this component

  • At first fork and clone this repo.

  • Install all dependencies:

    1. npm install
    2. npm install --global gulp-cli
  • Build the npmdist folder and execute tslint:

    1. gulp all
  • Execute unit tests and coverage (output is generated to the test-output folder):

    1. npm test
  • Run sample application:

    1. npm start
    2. Open http://localhost:5000 to browser
  • Build a local npm installation package:

    1. gulp all
    2. cd npmdist
    3. npm pack
    • local installation package is created to the npmdist folder. For example: ngx-mydatepicker-0.0.1.tgz
  • Install local npm package to your project:

    1. npm install path_to_npmdist/ngx-mydatepicker-0.0.1.tgz

Compatibility (tested with)

  • Firefox (latest)
  • Chrome (latest)
  • Chromium (latest)
  • Edge
  • IE11
  • Safari

License

  • License: MIT

Author

  • Author: kekeh (Original)
  • Author: ronsc (Fork)

Keywords

  • Date picker
  • Angular2
  • Angular4
  • date picker thai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.