项目作者: NilavPatel

项目描述 :
Angular date picker component
高级语言: TypeScript
项目地址: git://github.com/NilavPatel/np-ui-date-picker-package.git
创建时间: 2019-05-03T13:51:45Z
项目社区:https://github.com/NilavPatel/np-ui-date-picker-package

开源协议:MIT License

下载


np-ui-date-picker

Angular 9 Native date picker component.

Check demo Here

NPM

$ npm i np-ui-date-picker

HTML

  1. <np-ui-date-picker
  2. [(ngModel)]="startDate">
  3. </np-ui-date-picker>

Properties

  1. ngModel : Date
    two way date binding model value.
    value must be date type object.
  2. format : string
    pass date format as string, date will be shown in given format in text box.
    default format is dd/MM/yyyy
  3. disabled : boolean
    true/false - set component disabled.
  4. required : boolean
    default value is false. add required attribute to input textbox.
  5. defaultOpen : boolean
    default open datepicker, user can not close this. no textbox will be shown.
  6. minDate : Date
    no date will be selected less than min date.
    Default calender shows min year upto CurrentYear - 100, but if need to set years less than that,
    then set minDate validation with less year numbers.
  7. maxDate : Date
    no date will be selected greater than max date.
    Default calender shows max year upto CurrentYear + 100, but if need to set years more than that, then set maxDate validation with high year numbers.
  8. placeholder : string
    set placeholder for datepicker
  9. showTodayButton : boolean
    show/hide Today link in datepicker pop up, on click of link today’s date will be set as selected.
  10. disableWeekDays : string[]
    disable week days for date picker. Possible values for array are “Su”, “Mo”, “Tu”, “We”, “Th”, “Fr”, “Sa”.
  11. disableDates : Date[]
    disable dates in date picker. Assign array of dates to this property.
  12. dateLabels: any[]
    Example: [{ date : new Date(), label: “Today”}]
    Lables tooltip will be shown on hover of dates passed in this property.
  13. isStartMonthWithMonday : boolean
    If set to true then month will be start with Monday, default value is false.
  14. styleClass : string
    set name of css class.

Methods

  1. onChange
    on change event binding.

Other np-ui components for Angular

  1. Data grid
  2. Date picker
  3. Time picker
  4. Color picker

License

This project is licensed under the MIT License.

Contributors