# vue-datetime-js

> A Vue.js datepicker component

Latest version **1.2.3** (published 2024-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-datetime-js
pnpm add vue-datetime-js
yarn add vue-datetime-js
bun add vue-datetime-js
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2024-12-30 |
| First published | 2019-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | mahdad ghasemian |
| Maintainers | mahdad |
| Keywords | vuejs, persian, jalali, hijri, islamic, gregory, gregory, christian, datepicker, timepicker, datetime picker, vue datepicker, persian datepicker, jalali datepicker, hijri datepicker, Umm al-Qura datepicker, islamic calendar, christian datepicker, gregory datepicker |

## Links

- npm: https://www.npmjs.com/package/vue-datetime-js
- Repository: https://github.com/MahdadGhasemian/vue-datetime-js
- Homepage: https://github.com/MahdadGhasemian/vue-datetime-js#readme
- Issues: https://github.com/MahdadGhasemian/vue-datetime-js/issues
- npm.io page: https://npm.io/package/vue-datetime-js

## Dependencies (2)

- [moment-hijri](https://npm.io/package/moment-hijri.md) ^2.1.2
- [moment-jalaali](https://npm.io/package/moment-jalaali.md) ^0.7.3

## Recent versions

- 1.2.3 (latest) — 2024-12-30
- 1.2.2 — 2019-12-04
- 1.2.1 — 2019-12-02
- 1.2.0 — 2019-12-02
- 1.1.0 — 2019-12-01
- 1.0.5 — 2019-12-01
- 1.0.4 — 2019-11-28
- 1.0.3 — 2019-11-28
- 1.0.2 — 2019-11-28
- 1.0.1 — 2019-11-28
- 1.0.0 — 2019-11-28

## README

# vue-datetime-js

[![npm version](https://badge.fury.io/js/vue-datetime-js.svg)](https://www.npmjs.com/package/vue-datetime-js)

# ⚠️ Project Archived

This project is no longer maintained and has been archived as of December 30, 2024.

As I have shifted my focus away from Vue development, I am unable to provide updates, fixes, or ongoing support for this package.  

Thank you to everyone who has used the `vue-datetime-js` over the years.

## Document

See documentation and demo at [vue-datetime-js](https://mahdadghasemian.github.io/vue-datetime-js)

## Installation

### npm

```bash
npm install vue-datetime-js --save
```

webpack.config.js:

```javascript
/**
 * configuration for moment to ignore loading locales
 */
module.exports.plugins = [
  //...
  new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
  //...
]
```

### Usage

main.js

```javascript
//...
import VueDatetimeJs from 'vue-datetime-js'
Vue.component('date-picker', VueDatetimeJs)
//...
```

Or in component

```html
<template>
  <div>
    <date-picker v-model="date"></date-picker>
  </div>
</template>

<script>
  import VueDatetimeJs from 'vue-datetime-js'
  export default {
    data() {
      return {
        date: '',
      }
    },
    components: {
      datePicker: VueDatetimeJs,
    },
  }
</script>
```

## You can also set default values:

main.js

```javascript
import VueDatetimeJs from 'vue-datetime-js'
Vue.use(VuePersianDatetimePicker, {
  name: 'custom-date-picker',
  props: {
    inputFormat: 'YYYY-MM-DD HH:mm',
    format: 'jYYYY-jMM-jDD HH:mm',
    editable: false,
    inputClass: 'form-control my-custom-class-name',
    placeholder: 'Please select a date',
    altFormat: 'YYYY-MM-DD HH:mm',
    color: '#00acc1',
    autoSubmit: false,
    //...
    //... And whatever you want to set as default
    //...
  },
})
```

Then use in component

```html
<custom-date-picker v-model="date"></custom-date-picker>
```

## Built With

- [Vuejs](https://vuejs.org/) - The Progressive JavaScript Framework.
- [Moment.js](https://momentjs.com/) - Parse, validate, manipulate, and display dates and times in JavaScript.
- [moment-jalaali](https://github.com/jalaali/moment-jalaali) - A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.
- [moment-hijri](https://github.com/xsoh/moment-hijri) - A Hijri calendar (Based on Umm al-Qura calculations) plugin for moment.js.
- [vue-persian-datetime-picker](https://github.com/talkhabi/vue-persian-datetime-picker.git) - A vue plugin to select jalali date and time.

## License

This project is licensed under the MIT License

## Change log

### 1.2.3 (2024-12-30)

- Project Archived

### 1.2.2 (2019-12-04)

- Fix build and ReadMe

### 1.2.1 (2019-12-02)

- Fix sample page vue

### 1.2.0 (2019-12-02)

- Add calendar (gregory, jalali, hijri)

### 1.1.0 (2019-12-01)

- Remove localeLange
- Add Hijri calendar
- Fix (Hijri ('ar-sa') - Jalalli ('fa') - Gregory ('en'))

### 1.0.4 (2019-11-28)

- Some Test

### 1.0.3 (2019-11-28)

- Add localeLange Prop

### 1.0.2 (2019-11-28)

- Some Test

### 1.0.1 (2019-11-28)

- Fix Readme file

### 1.0.0 (2019-11-28)

- Fork from vue-persian-datetime-picker

---
_Source: https://npm.io/package/vue-datetime-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
