0.0.6 • Published 6 months ago

@tuv-indo/date v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

tuv date

tuv date is a strict and customizable date component for web development projects, designed for simplicity and adherence to strict design guidelines.

Screenshots

App Screenshot

Package instalation

Instal package using pnpm

  pnpm add @tuv/date

Instal package using yarn

  yarn add @tuv/date

Instal package using npm

  npm i @tuv/date

Usage/Examples

import React from "react";
import {tuvDate, IDateRange} from "@tuv/date";
import ReactDOM from "react-dom/client";
import {useState} from "react";

const App = () => {
  // NOTE! IF YOU WANT TO USE ONLY DATE ,THEN JUST PAST DATE,IN EXAMPLE BELLOW IS dateDays, BUT IF U WANT TO USE DATE RANGE THEN YOU SHOULD PAS DATE RANGE, IN EXAMPLE BLLEO IS dateRange OR PERHAPS YOU WILL GET ERROR,PLEASE FOLLOW THE INSTRUCTURE BELLOW
  const [dateDays, setDateDays] = (useState < IDateRange) | (Date > new Date());
  const [dateRange, setDateRange] =
    (useState < IDateRange) |
    (Date >
      {
        from: new Date(),
        to: new Date(),
      });

  return (
    <div
      style={{
        maxWidth: "300px",
        margin: "100px auto",
      }}
    >
      // DATE RANGE EXAMPLE
      <tuvDate
        value={dateRange}
        onChange={(e: IDateRange) => setDateRange(e)}
        filter="days"
        rangedDate
      />
      // DATE
      <tuvDate
        value={dateDays}
        onChange={(e: DATE) => setDateRange(e)}
        filter="days"
      />
    </div>
  );
};

Props

Props that you can pass to <ToastContainer {...props} />

Prop NameValuerequired
valueDatetrue
onChange(props: any) => voidtrue
filter'days', 'months', 'years'true
inputbooleanfalse
rangedDatebooleanfalse
0.0.6

6 months ago

0.0.3

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.2

7 months ago

0.0.1

8 months ago