New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

reactjs-weekdays-picker

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactjs-weekdays-picker

reactjs-weekdays-picker is a highly customizable React library that provides four versatile components for selecting days of the week. Whether you need a simple dropdown, a circular day picker, or a custom menu selector, this package offers flexible and e

latest
Source
npmnpm
Version
1.1.6
Version published
Maintainers
2
Created
Source

reactjs-weekdays-picker

npm version npm npm

A customizable React module for day selection with various components like dropdown selectors, circular day pickers, and custom menu selectors.

Live Demo: https://jaditi930.github.io/reactjs-weekdays-picker/

Installation

NPM

To install the latest stable version:

npm install reactjs-weekdays-picker

Usage

1. DefaultSelector

A circular day picker component with customizable day length display and multiple selection options.

DefaultSelector

import React, { useState } from 'react';
import { DefaultSelector } from 'reactjs-weekdays-picker';

export default function App() {
  const [selectedDays, setSelectedDays] = useState([]);

  return (
    <DefaultSelector
      multiple={true}
      state={selectedDays}
      setState={setSelectedDays}
      dayList={['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']}
      selectedColor="#007bff"
      unselectedColor="#d3d3d3"
      selectedTextColor="#ffffff"
      unselectedTextColor="#000000"
      width="200px"
      displayLength={3}  // Display the first three characters of each day name
    />
  );
}

2. DropdownSelector

A dropdown component that allows users to select one or more days from a list.

DropdownSelector

import React, { useState } from 'react';
import { DropdownSelector } from 'reactjs-weekdays-picker';

export default function App() {
  const [selectedDays, setSelectedDays] = useState([]);

  return (
    <DropdownSelector
      state={selectedDays}
      setState={setSelectedDays}
      dayList={['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']}
      multiple={true}
      selectedColor="#007bff"
      unselectedColor="#d3d3d3"
      width="200px"
    />
  );
}

3. CircularDayPicker

A circular day picker component that visualizes selected days in a pie chart format.

CircularSelector

import React, { useState } from 'react';
import { CircularSelector } from 'reactjs-weekdays-picker';

export default function App() {
  const [selectedDays, setSelectedDays] = useState([]);

  return (
    <CircularSelector
      state={selectedDays}
      setState={setSelectedDays}
      dayList={['Mon', 'Tue', 'Wed', 'Thu', 'Fri']}
      selectedColor="#007bff"
      unselectedColor="#d3d3d3"
    />
  );
}

4. CustomMenuSelector

A custom dropdown component with tick icons for selected items.

CustomMenuSelector

import React, { useState } from 'react';
import { CustomMenuSelector } from 'reactjs-weekdays-picker';

export default function App() {
  const [selectedDays, setSelectedDays] = useState([]);

  return (
    <CustomMenuSelector
      state={selectedDays}
      setState={setSelectedDays}
      dayList={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']}
      selectedColor="#007bff"
      unselectedColor="#d3d3d3"
      placeholder="Select days"
    />
  );
}

Props

Common Props for All Components

NameTypeRequiredDefaultDescription
multipleboolfalsefalseWhether to allow multiple selections.
dayListarrayfalse['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']List of days to display.
statearrayfalse[]State to manage selected days.
setStatefunctionfalseundefinedFunction to update the state of selected days.
onDayChangefunctionfalseundefinedCallback function that triggers when the selected days change. Receives the updated array of selected days as an argument.
selectedColorstringfalse#007bffBackground color for selected items.
unselectedColorstringfalse#d3d3d3Background color for unselected items.
selectedTextColorstringfalse#ffffffText color for selected items.
unselectedTextColorstringfalse#000000Text color for unselected items.
fontSizestringfalseinheritFont size of the text.
fontWeightstringfalsenormalFont weight of the text.
fontStylestringfalsenormalFont style of the text.

Additional Props for DefaultSelector

NameTypeRequiredDefaultDescription
widthstringfalse'150px'Width of the component.
selectedHoverColorstringfalse#0056b3Hover color for selected items.
unselectedHoverColorstringfalse#f0f0f0Hover color for unselected items.
displayLengthnumberfalse1Number of characters to display for each day.
optionContainerStyleReact.CSSPropertiesfalse{}Custom styles for the options container.
optionStyleReact.CSSPropertiesfalse{}Custom styles for each option.

Additional Props for CircularDayPicker

NameTypeRequiredDefaultDescription
radiusnumberfalse100Radius of the circular chart.
strokeWidthnumberfalse10Width of the stroke for the pie chart segments.
sizestringfalse100pxSize of the circular chart.

Additional Props for DropdownSelector

NameTypeRequiredDefaultDescription
widthstringfalse150pxWidth of the component.
inputTextColorstringfalse#000000Color of the input text.
placeholderstringfalseSelect daysPlaceholder text for the dropdown input.
inputBgColorstringfalse#fffBackground color of the input box.
inputBoxStyleReact.CSSPropertiesfalse{}Custom styles for the input box.
dropdownContainerStyleReact.CSSPropertiesfalse{}Custom styles for the dropdown container.
dropdownItemStyleReact.CSSPropertiesfalse{}Custom styles for each dropdown item.

Additional Props for CustomMenuSelector

NameTypeRequiredDefaultDescription
widthstringfalse'auto'Width of the component.
inputTextColorstringfalse'#000000'Color of the input text.
placeholderstringfalse'Select days'Placeholder text for the dropdown input.
iconAlignstringfalse'right'Alignment of icons in the dropdown menu.
displayOptionstringfalse'both'Determines what to display: icons, text, or both.
showIconsbooleanfalsetrueWhether to display icons next to the items.
showTicksbooleanfalsetrueWhether to show ticks for selected items.
excludeDaysarrayfalse[]List of days to exclude from the menu.
iconOrdernumberfalse1Order of the icons in the dropdown.
dayOrdernumberfalse2Order of the day names in the dropdown.
tickOrdernumberfalse3Order of the tick marks in the dropdown.
inputBgColorstringfalse#fffBackground color of the input box.
inputBoxStyleReact.CSSPropertiesfalse{}Custom styles for the input box.
dropdownContainerStyleReact.CSSPropertiesfalse{}Custom styles for the dropdown container.
dropdownItemStyleReact.CSSPropertiesfalse{}Custom styles for each dropdown item.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

We welcome contributions! Please open an issue or submit a pull request for any feature requests or bug fixes.

Keywords

React

FAQs

Package last updated on 22 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts