Skip to content

WeekDaysSelector

A day-of-week selector that supports both radio (single selection) and checkbox (multi-selection) modes. Renders Mon–Sun labels with accessible inputs.

Radio Mode (Single Day)

Demo

Selected: monday

Checkbox Mode (Multiple Days)

Checkbox Mode

Selected: monday, wednesday, friday

Props

Props
PropTypeDefaultDescription
modelValuerequiredDaysChoosen | stringIn radio mode: the selected day string (e.g. 'monday'). In checkbox mode: a DaysChoosen object with boolean values per day.
mode'radio' | 'checkbox''radio'Selection mode. Radio allows one day, checkbox allows multiple.
labelstring'Days of the week'Label text displayed above the selector.
requiredbooleanfalseMarks the field as required.
disabledbooleanfalseDisables all day inputs.
showRequiredbooleanfalseShows the required asterisk on the label.

DaysChoosen Interface

ts
interface DaysChoosen {
  sunday: boolean
  monday: boolean
  tuesday: boolean
  wednesday: boolean
  thursday: boolean
  friday: boolean
  saturday: boolean
}

Emits

Emits
EventPayloadDescription
update:modelValueDaysChoosen | stringEmitted on day change. In radio mode: string (day name). In checkbox mode: updated DaysChoosen object.

Built with VitePress