npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dara-datetimepicker

v0.2.3

Published

Dara Datetime picker

Downloads

46

Readme

DateTimePicker

An easy to use lightweight javascript calendar library.

License: MIT npm version npm minzipped size

Browser Support

| Chrome | Firefox | Safari | Opera | Edge | | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |

Installation

npm install dara-datetimepicker

OR

yarn add dara-datetimepicker

or download zip

start

npm start

build

npm run build

datetimepicker 사용방법


// language
DateTimePicker.setMessage({
    year: '년',
    month: '월',
    day: '일',
    am: "오전",
    pm: "오후",
    today: '오늘',
    ok: '선택',
    months: {
    full: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
    abbr: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
    },
    weeks: {
    full: ["월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"],
    abbr: ["월", "화", "수", "목", "금", "토", "일"]
    },
});

// mode=date
new DateTimePicker('#dateText', {
    initialDate: '2023-08-10' // init date
    , format: 'YYYY-MM-DD'
    , mode: 'date'
    , minDate: DateTimePicker.parser('2023-08-05')
    , maxDate: DateTimePicker.parser('2050-09-30')
    , onSelect: (dt) => {
        console.log(dt);
        //return false;
    }
    , zIndex: 1000
    },{
    ok:"Ok"
})

// mode=datetime
new DateTimePicker('#datetimeText',{initialDate:new Date(),format: 'YYYY-MM-DD HH:mm',  mode: 'datetime'});

// mode=time
new DateTimePicker('#timeText',{initialDate:new Date(),format: 'HH:mm', mode: 'time'});

// mode=month
new DateTimePicker('#monthText',{initialDate:new Date(),format: 'YYYY-MM', mode: 'month'});

// mode=year
new DateTimePicker('#yearText',{initialDate:new Date(),format: 'YYYY', mode: 'year'});

// mode=datetime embed
new DateTimePicker('#date', {
    inline: true
    , showMonthAfterYear: true
    , mode: 'datetime'
    , weekStartDay: 1
    , minDate: DateTimePicker.parser('2023-08-05')
    , maxDate: DateTimePicker.parser('2025-09-30')
    , initialDate: new Date() // 초기화 요일
    , onSelect: (dt, mode, e) => {
        console.log('select', dt, mode, e);
    }
    , beforeChangeDatepicker: (dt, callbackFn) => { 
        console.log('beforeChangeDatepicker', dt);
        callbackFn(true); // callback 을 사용하루 경우  return 은 무조건 false
        return false;
    }
    , afterChangeDatepicker: (dt, mode) => {
        console.log('afterChangeDatepicker', dt, mode);
    }
    , beforeDrawDate: (dt) => {
    //return false; 
    return {
        style: '111'
        //, tooltip: dt.date
    }
    }
    , zIndex: 1000
});

Options

| key | Desc | Default | Option | | ----------- | ----------------- | ------------ | --------------------------------- | | inline | embed | false | | | weekStartDay| start day | 0 | 0:Sun, 1:Mon, 2:Tue, 3:Wed, 4:Thu, 5:Fri, 6:Sat | | initialDate | initial date | new Date() | | | mode | view mode | date | year, month, date, datetime, time | | enableTodayBtn | enable today button | false | false, true| | showMonthAfterYear | show month after | false | true ,false | | format | date format | 'YYYY-MM-DD' | | | zIndex | css z-index | 1000 | | | autoClose | auto close | true | true, false | | minDate | minimum date | '' | | | maxDate | maximum date | '' | | | onLoad | load event | | | | onSelect | date select event | | | | beforeChangeDatepicker | date change before event | | | | afterChangeDatepicker | date change after event | | | | beforeDrawDate | before date draw | | |

Language

| key | Desc | Default | | ------ | ------------- | -------------------------------------------------------------------------------------------------------------------------- | | year | year | Year | | month | Month | Month | | day | Day | Day | | am | AM | AM | | pm | PM | PM | | today | Today button | Today | | ok | H:M Ok button | Ok | | months | Months | | | | full | ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] | | | abbr | ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] | | weeks | weeks | | | | full | ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] | | | abbr | ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] |

License

Darainfo is under MIT License.