All Projects → FreddyFY → material-datepicker

FreddyFY / material-datepicker

Licence: MIT License
Material Datepicker

Programming Languages

javascript
184084 projects - #8 most used programming language
Less
1899 projects

Projects that are alternatives of or similar to material-datepicker

App Datepicker
Datepicker element built with Google's lit-element and Material Design 2
Stars: ✭ 142 (+389.66%)
Mutual labels:  polymer, datepicker
react-datepicker
A Datepicker built using Tailwind and react-popper
Stars: ✭ 31 (+6.9%)
Mutual labels:  datepicker
awesome-polymer
A collection of awesome Polymer resources.
Stars: ✭ 43 (+48.28%)
Mutual labels:  polymer
vue-pikaday
VueJS wrapper component for Pikaday datepicker
Stars: ✭ 37 (+27.59%)
Mutual labels:  datepicker
XPopupExt
XPopup扩展功能库,基于XPopup强大的弹窗能力和PickerView的选择器逻辑,封装了时间选择器弹窗、城市选择器弹窗和条件选择器。
Stars: ✭ 248 (+755.17%)
Mutual labels:  datepicker
react-picky-date-time
A react component for date time picker. Online demo examples
Stars: ✭ 41 (+41.38%)
Mutual labels:  datepicker
MaterialDjango
🖌️ Polymer Paper-UI widgets, vendored polymer, and tools for django
Stars: ✭ 27 (-6.9%)
Mutual labels:  polymer
PagerDatePicker
PagerDatePicker for Android
Stars: ✭ 82 (+182.76%)
Mutual labels:  datepicker
DatePicker
html价格日历控件
Stars: ✭ 21 (-27.59%)
Mutual labels:  datepicker
plotly-plot
Polymer element for the plotly.js library
Stars: ✭ 21 (-27.59%)
Mutual labels:  polymer
vue3-datepicker
Simple datepicker component for Vue 3
Stars: ✭ 93 (+220.69%)
Mutual labels:  datepicker
WheelPicker
A wheel picker for Android, support DateWheelPicker, TimeWheelPicker(滚轮控件,日期、时间选择器,省市区三级联动)
Stars: ✭ 33 (+13.79%)
Mutual labels:  datepicker
ionic4-date-picker
Calendar date picker for Ionic4 apps
Stars: ✭ 24 (-17.24%)
Mutual labels:  datepicker
multiselect-combo-box
A multi select combo box web component based on Polymer and the vaadin-combo-box
Stars: ✭ 41 (+41.38%)
Mutual labels:  polymer
vaadin-split-layout
The Web Component which allows you to partition a layout into resizeable areas. Part of the Vaadin components.
Stars: ✭ 40 (+37.93%)
Mutual labels:  polymer
react-native-datepicker-modal
React Native DatePicker Modal Component for iOS/Android
Stars: ✭ 48 (+65.52%)
Mutual labels:  datepicker
vaadin-context-menu
The responsive Web Component for showing context dependent items for any element on the page. Part of the Vaadin components.
Stars: ✭ 26 (-10.34%)
Mutual labels:  polymer
animated-content-placeholder
Animated placeholder used while loading elements on the page (Polymer)
Stars: ✭ 18 (-37.93%)
Mutual labels:  polymer
vaadin-checkbox
The Web Component for customized checkboxes. Part of the Vaadin components.
Stars: ✭ 18 (-37.93%)
Mutual labels:  polymer
web-components-good-practices
😎☑️ Good Practices for build Web Components.
Stars: ✭ 80 (+175.86%)
Mutual labels:  polymer

material-datepicker

Demo

Demo Page

Usage

Include the JavaScript file and Stylesheet in your html page. This plugin works with moment.js. There are two methods to include the Material-Datepicker.

Method 1 When you have included moment.js already.

  <script type="text/javascript" src="https://momentjs.com/downloads/moment-with-locales.min.js"></script>
  <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FreddyFY/material-datepicker/1.0.9/dist/material-datepicker.css">
  <script type="text/javascript" src="https://cdn.rawgit.com/FreddyFY/material-datepicker/1.0.9/dist/material-datepicker.min.js"></script>

Method 2 When you don't need moment.js itself.

  <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FreddyFY/material-datepicker/1.0.9/dist/material-datepicker.css">
  <script type="text/javascript" src="https://cdn.rawgit.com/FreddyFY/material-datepicker/1.0.9/dist/material-datepicker-with-moment-js.min.js"></script>

It's better to download the files, instead of using the rawgit cdn server.


In its simplest case, Material-Picker can be initialised with a single line of Javascript. You will probably also specify some options while applying the plugin.

var monthpicker = new MaterialDatepicker('input');
var monthpicker = new MaterialDatepicker('input', {
  type: 'month',
  lang: 'de',
  orientation: 'portrait'
});

Options

  • type (default: "date") [string] - Datepicker["date"], Monthpicker["month"]

  • lang (default: "en") [string] - Language

  • orientation (default: "landscape") [string] - Orientation of the picker: portait or landscape

  • color (default: "#80cbc4") [string] - Color of the picker; Html color values

  • zIndex (default: "100") [number] - z-index of the picker

  • position (default: "absolute") [string] - position of the picker [fixed, static, ..]

  • theme (default: "light") [string] - Theme of the picker: light or dark

  • openOn (default: "click") [string] - How to open the picker: Click-events or 'direct'

  • closeAfterClick (default: true) [string] - Close the picker after choose a date or not

  • date (default: today or string inside input) [type: Date Object] - The initial date of the Picker

  • weekBegin (default: "sunday") [string] - Beginning weekday of the week: sunday or monday

  • outputFormat (default: date "YYYY/MM/DD"; month "MMMM YYYY") [string] - Date-format* of the output [inside a input or OutputElement]

  • inputFormat (default: date "YYYY/MM/DD"; month "MMMM YYYY") [string] - Date-format* of the input value attribute [in the inputElement]

  • topHeaderFormat (default: "YYYY") [string] - Date-format* of the output [inside a input or OutputElement]

  • headerFormat (default: date "ddd, MMM D"; month "MMMM") [string] - Date format* in the header bar*

  • sitePickerFormat (default: date "MMMM YYYY"; month "YYYY") [string] - Date format* in the site picker bar*

  • onLoad (default: none) [function] - Function called when picker is loaded

  • onOpen (default: none) [function] - Function called when picker is open

  • onNewDate (default: none) [function] - Function called when new Date is picked and the picker is closed

  • onChange (default: none) [function] - Function called when the Date is changed, even if the picker is still open

  • outputElement (default: none) [string or Object] - Returns the date inside a SPAN-tag, P-tag or A-Tag

* http://momentjs.com/docs/#/displaying/format/

Example

var monthpicker = new MaterialDatepicker('input', {
  lang: 'de',
  orientation: 'portrait',
  theme: 'dark',
  color: 'red',
  date: new Date(861999834000),
  outputFormat: 'd-mm-yyyy',
  inputFormat: 'ddmmyyyy',
  outputElment: '.month',
  onChange: function() {
               alert('Date Changed!!')
             },
  onNewDate: function() {
               alert('New Date Chosen!!')
             }
});

API

.open()

.close()

.newDate( new Date(861999834000) ) set new Date

.date returns the current date

.element returns the choosen element

.picker returns the picker element

Building from source

  1. Clone the repository
  • git clone https://github.com/FreddyFY/material-datepicker.git
  1. Install dependencies
  • npm install
  1. Run grunt watch for development
  • npm start
  1. Run default grunt before a Pull Request
  • npm run build
  1. Output is in dist/
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].