1.4.99 • Published 3 years ago

@jungle_d/vue-date-time-picker v1.4.99

Weekly downloads
326
License
ISC
Repository
github
Last release
3 years ago

Vue-Date-Time-Picker

Simple date and time picker built with Vue 2.x+ and using Luxon to handle dates

How to use

Do a regular npm install vue-date-time-picker and the file can be imported either through require or import. There is no need of CSS imports since all styles are scoped into the components

<template>
	<div id="app">
		<date-time-picker v-model="test"></date-time-picker>
	</div>
</template>
<script type="text/javascript">
(function () {
	"use strict";
	module.exports = {
		"name": "App",
		"components": {
			"DateTimePicker": require("vue-date-time-picker").DateTimePicker
		},
		"data": function() {
			return {
				"test": new Date()
			}
		}
	};
}());
</script>
<style scoped lang="scss" rel="stylesheet/scss"></style>

Properties

PropRequiredDefaultDetails
elIdfalseString: "a" + Date.now()ID to attach to HTML element
value/v-modeltrueString/Object/Date: undefinedReactive variable to hold date selection value
minDatefalseString/Object/Date: undefinedMinimum date to control which dates can be selected
referenceDatefalseString/Object/Date: undefinedDate to be used as reference, or to define a range between two date-pickers instance
rangedPointfalseString: undefinedThis should be used to work with ranged dates with two date pickers instance, one will be start and the another will be end
placeholderfalseString: Insert dateInput placeholder
customTimeZonefalseString: ""Custom Time zone string to be applied
weekPatternfalseString: "default"Define which rules should be applied regarding week start. default = sunday to saturday, iso = monday to sunday
alignfalseString: "left"Define the alignment of the calendar popup relative to the input

Roadmap

This project is still on development and on its early phases. I had the need of such a component on my work so I thought that would be nice to open source it and keep improving over time. Any contributions, feature requests, feedbacks and/or tips are very well appreaciated. Feel free to open a PR or raise an issue at the Issues section.

Next features / needing help

  • Replace luxon by a vanilla js approach to reduce footprint
  • Handle events
  • Create more customisation options and enhance the ranged feature
  • Create a more complete sample page
  • Improve accessibility
  • Improve locale support on labels

Contributing

This project relies on Gulp.js and Babel to perform transformations. All css applied is bundled to each component.

  1. run npm install
  2. run gulp build to apply the changes
  3. The source code is under the src folder, and the js/main.js file is responsible to loading up the Vue.js component through components/date-time-picker instance
  4. Some css variables can be found under the src/scss/variables.scss file, this can be useful to customize the component
1.4.99

3 years ago

1.4.98

3 years ago

1.4.96

4 years ago

1.4.91

4 years ago

1.4.93

4 years ago

1.4.92

4 years ago

1.4.95

4 years ago

1.4.94

4 years ago

1.4.9

4 years ago

1.4.8

4 years ago

1.4.7

4 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.3

4 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.17

5 years ago

1.2.16

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.2.13

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago