All Projects → DomonJi → Vue Clock Picker

DomonJi / Vue Clock Picker

Licence: mit
A vue-based time picker Component

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Clock Picker

Angular Datepicker
Highly configurable date picker built for Angular applications
Stars: ✭ 386 (+889.74%)
Mutual labels:  component, timepicker
Create Wxapp Page
创建微信小程序页面的命令行工具
Stars: ✭ 37 (-5.13%)
Mutual labels:  component
React Iron Image
Image lazy loading React component inspired by Polymer's iron-image component.
Stars: ✭ 32 (-17.95%)
Mutual labels:  component
Optimize draw call
for CocosCreator
Stars: ✭ 35 (-10.26%)
Mutual labels:  component
React Base Table
A react table component to display large datasets with high performance and flexibility
Stars: ✭ 966 (+2376.92%)
Mutual labels:  component
React Native Swipeable Cards Demo
Facebook-style swipeable cards with React Native Interactable.
Stars: ✭ 36 (-7.69%)
Mutual labels:  component
React Native Aws Iot Device Shadows
React Native Component for connecting to AWS IoT Shadows from a device using SDK JavaScript bundle
Stars: ✭ 30 (-23.08%)
Mutual labels:  component
React Currency Formatter
💵 react component for currency formatting
Stars: ✭ 38 (-2.56%)
Mutual labels:  component
Hellobooks
A Single-Page Library Management App built with nodejs, express and react and redux
Stars: ✭ 37 (-5.13%)
Mutual labels:  component
Finder
The Finder component finds files and directories via an intuitive fluent interface.
Stars: ✭ 7,840 (+20002.56%)
Mutual labels:  component
React Password Mask
Show/hide the contents of a password field.
Stars: ✭ 34 (-12.82%)
Mutual labels:  component
Vue Share Buttons
🔗A set of social buttons for Vue.js
Stars: ✭ 34 (-12.82%)
Mutual labels:  component
React Customizable Progressbar
Customizable circular progress bar component for React 🍩
Stars: ✭ 37 (-5.13%)
Mutual labels:  component
Jcnavigator
A decoupled navigator framework of jumping between modules or apps for iOS development.
Stars: ✭ 33 (-15.38%)
Mutual labels:  component
React Native Really Awesome Button
React Native button component. Awesome Button is a 3D at 60fps, progress enabled, social ready, extendable, production ready component that renders an awesome animated set of UI buttons. 📱
Stars: ✭ 988 (+2433.33%)
Mutual labels:  component
React Image Lightbox
React lightbox component
Stars: ✭ 956 (+2351.28%)
Mutual labels:  component
Wonders
🌈 Declarative JavaScript framework to build command-line applications.
Stars: ✭ 34 (-12.82%)
Mutual labels:  component
Vue Direction
👋 Declarative, direction-aware hover in Vuejs
Stars: ✭ 35 (-10.26%)
Mutual labels:  component
Vst2
Bindings for vst2 sdk
Stars: ✭ 39 (+0%)
Mutual labels:  component
Dom99
Extend html with directives
Stars: ✭ 37 (-5.13%)
Mutual labels:  component

Vue-Clock-Picker

npm version js-standard-style GitHub license

NPM

A lite time picker vue-component, writing in es6 standrad style.

SHOW

24 Hours Mode, with Material Design. Try the Live Demo

24HoursMode vue-clock-picker

Until now, this component has only one theme -- The Material Theme. I'll working on more themes later.

HAVE A TRY

$ git clone https://github.com/DomonJi/vue-clock-picker.git

$ npm install

$ npm run dev

INSTALL

$ npm install vue-clock-picker

dependencies:

USAGE

<!-- in some vue component -->
<template>
    <div>
        <vue-clock-picker
            mode="24" :defaultHour="defaultHour"
            :defaultMinute="defaultMinute"
            :onTimeChange="timeChangeHandler"
        >
        </vue-clock-picker>
    </div>
</template>

<style>
/*your style*/
</style>
<script>
import VueClockPicker from 'vue-clock-picker'
export default {
    components: {
        VueClockPicker
    },
    data(){
        return {
            defaultHour:new Date().getHours(),
            defaultMinute:new Date().getMinutes()
        }
    },
    methods:{
        timeChangeHandler(){
            // ...
        }
    }
}
</script>

For more detail, you can see the source code.

APIS

Props

  • defaultHour
  • defaultMinute

String or Number

defaultHour="12"
  • defaultFocused

Boolean

Whether the picker pannel is focused or not when it did mount. Default false

defaultFocused="false"
  • onFocusChange

Function

The callback func when component focused state is changed.

  • onHourChange

Function

The callback func when component hour state is changed.

onHourChange(hour) {
  // ...
}
  • onMinuteChange

Function

The callback func when component minute state is changed.

onMinuteChange(minute) {
  // ...
}
  • onTimeChange

Function

The callback func when component hour or minute is changed.

onTimeChange(time) {
  let { hour, minute } = time
  // ...
}

TODOS

  • Test

    • [x] TimePicker Component
    • [x] PickerPointGenerator Component
    • [x] TimePickerModal Component
    • [x] PickerPoint Component
    • [ ] OutsideClickHandler Component
  • Themes

    • [x] Material Theme
    • [ ] Classical Theme
  • Mode

    • [ ] 12h mode
    • [x] 24h mode
  • Animations

    • [x] Panel Animations
    • [ ] PickerModal Animations

THANK

Thanks to the Ecmadao's open source project: react-times, I have learn a lot from that. Thanks.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].