@belatrix/datepicker

DatePicker is a component to display a simple and configurable datepicker.

Usage no npm install needed!

<script type="module">
  import belatrixDatepicker from 'https://cdn.skypack.dev/@belatrix/datepicker';
</script>

README

Belatrix Angular Framework - DatePicker CI status

DatePicker is a component to display a simple and configurable datepicker.

Installation

Requirements

npm install --save @belatrix/datepicker

Usage

import { DatepickerModule } from '@belatrix/datepicker';

@NgModule({
  declarations: [ ... ],
  imports: [
    ...,
    DatepickerModule
  ],
  bootstrap: [ ... ]
})
export class AppModule { }

import { DatepickerOptions } from '@belatrix/datepicker';

@Component({
  selector: '',
  templateUrl: '',
  styleUrls: ['']
})
export class AppComponent {
  date: Date;
  options: DatepickerOptions = {
    displayFormat: 'DD-MM-YYYY',
    placeholder: 'Select a date...',
    useEmptyBarTitle: false,
    locale: 'es'
  };
  constructor() {
    this.date = new Date();
  }
}

  • locale => 'es': Spanish, 'en': English, 'fr': French.

HTML

<bsf-datepicker [(ngModel)]="date" [options]="options"></bsf-datepicker>

Development

Want to contribute? Great!

$ git clone https://gitlab.com/belatrix-resources/front-end/angular/datepicker.git
$ npm install 
$ npm start

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT