ng2-ui / datetime-picker

Angular2 DateTime Picker
https://ng2-ui.github.io/#/datetime-picker
MIT License
121 stars 62 forks source link

How enable Saturday and Sunday #221

Open SubhenduScottDas opened 6 years ago

SubhenduScottDas commented 6 years ago

Would like to know how to enable Saturday and Sunday and be able to select.

kurodaSensei commented 6 years ago

Hi @ScottHitachi For enable weekend day's, set NguiDatetime.weekends to null Example: NguiDatetime.weekends = [null, null]; In your module.

import { NguiDatetimePickerModule, NguiDatetime } from '@ngui/datetime-picker';

// Override Weekends day's object formatter
NguiDatetime.weekends = [null, null];

@NgModule({
  imports: [BrowserModule, FormsModule, NguiDatetimePickerModule],
  declarations: [AppComponent],
  bootstrap: [ AppComponent ]
})
export class AppModule { }
allenhwkim commented 6 years ago

@kurodaSensei thanks, I even forgot about that although I designed and coded it (getting old)