Question: What can the calendar do?
Answer: Very basic stuff:
- Show month (user choice)
- Navigate between months
- Select a day (emits event)
- Go back to initial month
npm
npm install angular-roc
GitHub
git clone https://github.com/nicojones/angular-roc.git
Import ROC
into your module
@NgModule({
imports: [
...
ReadonlyCalendarModule
...
]
})
And use it in your component
<readonly-calendar></readonly-calendar>
Q: Why another calendar? There are thousands
A: They all are trying to do everything. ROC (which stands for Read-Only Calendar) does exactly what it says: It's mostly read-only.
Q: Why a component?
A: Angular Datepicker and other components are more than
a user needs 90% of the cases. If all you need to do is pick a date, see the month, etc., this is exactly what you need.
Q: Readonly... can I use it as a Datepicker?
A: Yes! Set [disabled]="false"
and you listen to the (dayClick)
event.
Q: Can I use it in my language?
A: Yes! See Localisation below.
Q: Your calendar looks very ugly.
A: I did not want to add styles that you would have to overwrite, increasing package size. I encourage you
to use your own CSS/Styles, or import the themes/basic.scss
or themes/basic.css
to have a quick ("ok") version.
Q: How do you open and close it?
A: It's always open. Hide it with display: none
or *ngIf="false"
. No more settings available.