0.2.2 • Published 7 months ago

qwik-calendar v0.2.2

Weekly downloads
-
License
LGPL-3.0-only
Repository
github
Last release
7 months ago

qwik-calendar

A calendar component for qwik apps!

The goal is to recreate wojtekmaj/react-calendar for qwik applications. This library is still in development so there are a lot of incomplete stuff

Instalation

You can install this component libary using:

npm i qwik-calendar

Usage

import { Calendar } from "qwik-calendar";

export default () => {
  return (
    <>
      <head>
        <meta charSet="utf-8" />
        <title>Qwik Calendar by Kunum</title>
      </head>
      <body>
        <Calendar/>
      </body>
    </>
  );
};

User guide

Calendar

import { Calendar } from "qwik-calendar";

<Calendar/>
Prop nameProp TypeDescriptionDefault valueExample values
onClickDay$(day: Date) => void | undefinedFunction called when the user clicks a day.n/a(value) => alert('Clicked day: ', value)
calendarStylesCSSProperties| undefinedCSS styles for the calendar containern/a{borderRadius: "10px"}
navigationStylesCSSProperties| undefinedCSS styles for the navigation (header) containern/a{backgroundColor: "#DDDDDD"}
navigationButtonStylesCSSProperties | undefinedCSS styles for the buttons on the navigation barn/a{fontSize: "12px"}
monthViewStylesCSSProperties| undefinedCSS styles for the month view (days) containern/a{backgroundColor: "#EEEEEE"}
yearViewStylesCSSProperties | undefinedCSS styles for the year view (months) containern/a{backgroundColor: "#EEEEEE"}
dayStylesCSSProperties| undefinedCSS styles for each individual day (MonthView)n/a{borderRadius: "50%"}
monthStylesCSSProperties | undefinedCSS styles for each individual month (YearView)n/a{borderRadius: "10%"}
daysStylesCSSProperties| undefinedCSS styles for the days containern/a{backgroundColor: "#EEEEEE"}
invalidDayStylesCSSProperties| undefinedCSS styles for invalid days (days from other months)n/a{color: "#FEFEFE"}
dayTextColorstring | undefinedThe color of the day number"#00000""#101101"
weekendTextColorstring | undefinedThe color of the weekend day number"#d10000""ff0000"
todayBgColorstring | undefinedThe background color used to mark the current day in the calendar"#ffff76""ffe386"
localestring | undefinedThe language of the calendar"pt-br""en-us"
hideNavigationboolean | undefinedDefines if the navigation bar is going to be displayedfalsetrue
showNeighbouringMonthboolean | undefinedDefines if the Month View is going to display days from the neighbouring monthstruefalse
startingViewstring | undefinedDefines in which view the calendar will start when first-rendered"month""year"

Views

Views are pre-defined exibition of the calendar that shows diferent kinds os dates. The user can move foward or backwards through the dates faster using diferent views that can be changed using the navigation bar.

Avaliable views:

  • Month View: Shows an specific month with all of its days.
  • Year view: Shows an specific year with all of its months.
  • Decade view: Shows all years within an decade.

Docs in other languages

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago

0.0.1

7 months ago