1.0.3 • Published 6 years ago

marsh-monthpicker v1.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Monthpicker

This package is built on top of Javascript Angular 5/6 Framework.

Description

Monthpicker is developed to select particular month in any angular based application. It is responsive, which works from desktops, laptops, tablets and mobile device as well.

How to Use

Steps to install Monthpicker Library in the application 1. Install with npm install marsh-monthpicker

  1. Add MonthpickerModule in app.module.ts
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { AppComponent } from './app.component';
    import { MonthpickerModule } from 'marsh-monthpicker';
    @NgModule({
        imports: [ 
            BrowserModule,
            MonthpickerModule
        ],
        providers: [],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
  1. Add HTML Tags in app.component.html
    <input [monthTrigger] ="monthId">
    <app-months #monthId [monthOptions] ="alloptions"></app-months>
  1. In component.ts pass parameters
    this.alloptions = {
        textFormat : "MMM",
        selectedMonthBgColor : "#000000",
        selectedMonthTextColor : "#ffffff",
        transition : "fadeIn",
        position : "bottom"
    }

5.Properties

NameTypeDefault ValueRequiredOptions
textFormatstringMMMYesMMM(Eg. Jan), MMMM(Eg. January)
selectedMonthBgColorstring#000000YesAny color code (Eg. #EEEEEE)
SelectedMonthTextColorstring#ffffffYesAny color code (Eg. #666666)
transitionstringnoneNobounce, fadeIn, scale
positionstringbottomNotop, bottom

Demo

This is Demo