Reputation: 93
I've been searching for a weekday picker, that allows to choose only the day of the week (Monday, Tuesday, Wednesday, etc) without showing exact days of the month. But I haven't found any of those, only default datepickers with dates, years and other common stuff.
Maybe someone has already found such a weekday picker? Would be glad for help. If not, I guess the easiest way is to build one from scratch.
I found only similar picker for angularJS. Here's what I mean -
`https://codepen.io/jasesmith/pen/reLEyb`
Upvotes: 0
Views: 3314
Reputation: 2043
I've currently got this example that uses material-design chips, though the logic is portable.
I didn't bother putting the tests in here since I don't know how to run them from stackblitz. However if you want to use this code take a look at app.component.html
and app.component.ts
.
The selectable-chips.component
isn't really named abstractly enough. It takes in some default chips
, which it uses to create the chips list and it also takes in initialChips
if you want to pre-select some chips.
It will raise an event you can hook into, example in app.component.ts
(this one just console.logs
) to get the information you want.
Hope this helps.
Upvotes: 2