Socket
Socket
Sign inDemoInstall

vue-bootstrap-datetimepicker

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-bootstrap-datetimepicker

Vue.js component for bootstrap-datetimepicker


Version published
Weekly downloads
8.2K
decreased by-6.71%
Maintainers
1
Weekly downloads
 
Created
Source

Vue-Bootstrap-DatetimePicker

Vue.js v2.x component for eonasdan-bootstrap-datetimepicker

vue-js downloads npm-version github-tag license

Installation

npm install vue-bootstrap-datetimepicker --save
# OR
yarn add vue-bootstrap-datetimepicker

Requirements

  • Vue.js 2.x
  • Bootstrap 3
  • jQuery
  • Moment.js

Example

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

<script>
  // Import required dependencies
  import 'moment';
  window.$ = window.jQuery = require('jquery');
  import 'bootstrap';
  import datePicker from 'vue-bootstrap-datetimepicker';
  // You have to add CSS yourself
  import 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css';
  // Bootstrap css  
  import 'bootstrap/dist/css/bootstrap.css';
  
  export default {    
    data () {
      return {
        date: new Date(),       
      }
    },
    components: {
      datePicker
    }
  }
</script>

Props

The component accepts these props

AttributeRequiredTypeDescription
v-modelYesString / Date Object / moment/ nullSet or Get date-picker value
configNoObjectDatetime picker configuration options
placeholderNoStringSet placeholder on input
input-classNoString / ObjectAdd CSS class to input
input-nameNoStringSet input field name
requiredNoBooleanMake input field required
read-onlyNoBooleanMake input field read-only
disabledNoBooleanMake input field disabled
wrapNoBooleanSet this to true when wrapped in 'input-group'

Run examples on your localhost

  • Clone this repo
  • Make sure you have node-js >=6.10 and npm >=4.6.1
  • Install dependencies npm install
  • Run webpack dev server npm run dev
  • This should open the demo page at http://localhost:8080

todo

  • Inline mode
  • Publish on bower
  • Date range example

License

MIT License

Keywords

FAQs

Package last updated on 20 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc