All Projects → dmuy → Dcalendar

dmuy / Dcalendar

Licence: mit
JQuery calendar plugin plus date picker for input fields.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dcalendar

Material Datetime Picker
A material design date-time picker for the web
Stars: ✭ 238 (+981.82%)
Mutual labels:  material-design, date-picker
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+3936.36%)
Mutual labels:  material-design
Materialshell
A material design theme for your terminal. ✨
Stars: ✭ 750 (+3309.09%)
Mutual labels:  material-design
Demo Progressive Web App
🎉 A demo for progressive web application with features like offline, push notifications, background sync etc,
Stars: ✭ 798 (+3527.27%)
Mutual labels:  material-design
Materialscrollbar
An Android library that brings the Material Design 5.1 sidebar to pre-5.1 devices.
Stars: ✭ 761 (+3359.09%)
Mutual labels:  material-design
Vue Bootstrap With Material Design
Vue Bootstrap with Material Design - Powerful and free UI KIT
Stars: ✭ 803 (+3550%)
Mutual labels:  material-design
Bootstrap 5 Templates
A collection of free Bootstrap 5 templates designed with Material Design 2.0. Admin dashboard, e-commerce, landing pages & much more.
Stars: ✭ 722 (+3181.82%)
Mutual labels:  material-design
Laravel Angular6 Material
Laravel 5.6 + Angular 6 + Material Design single page application
Stars: ✭ 19 (-13.64%)
Mutual labels:  material-design
Quickmyanimelist
[Abandoned] The dream Chrome Extension for you with a MyAnimeList account.
Stars: ✭ 6 (-72.73%)
Mutual labels:  material-design
Materialize Sass
Materializecss rubygem for Rails Asset Pipeline / Sprockets
Stars: ✭ 785 (+3468.18%)
Mutual labels:  material-design
Slidetoact
A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄
Stars: ✭ 783 (+3459.09%)
Mutual labels:  material-design
Motiontoast
🌈 A Beautiful Motion Toast Library for Kotlin Android
Stars: ✭ 767 (+3386.36%)
Mutual labels:  material-design
Morphing Material Dialogs
Material dialog ❤️ morphing animation. An android kotlin UI library for building beautiful animations for converting a floating action button into a material dialog.
Stars: ✭ 806 (+3563.64%)
Mutual labels:  material-design
Textfieldboxes
Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.
Stars: ✭ 760 (+3354.55%)
Mutual labels:  material-design
Mdl Skeleton
Material Design skeleton with ssr-engine
Stars: ✭ 17 (-22.73%)
Mutual labels:  material-design
Stickyswitch
⭐️ beautiful switch widget with sticky animation ⭐️
Stars: ✭ 725 (+3195.45%)
Mutual labels:  material-design
Material Remixer Android
Remixer for Android. Live adjustment of app variables.
Stars: ✭ 782 (+3454.55%)
Mutual labels:  material-design
Timber
Material Design Music Player
Stars: ✭ 6,654 (+30145.45%)
Mutual labels:  material-design
Breeze
A Material Design game launcher for Windows
Stars: ✭ 22 (+0%)
Mutual labels:  material-design
Materialdesignsamples
Material Design 系列控件samples,讲了Material Design 系列新控件的使用方法和一些场景示例,使用详情请看对应博客,持续更新中...
Stars: ✭ 900 (+3990.91%)
Mutual labels:  material-design

You might want to checkout the duDatepicker plugin.

DCalendar

JQuery calendar plugin plus date picker for input fields.

alt text

How to use

Make sure you include the jQuery library first. Include dcalendar.picker.css and dcalendar.picker.js in your html file:

<link rel="stylesheet" type="text/css" href="dcalendar.picker.css">
<script type="text/javascript" src="dcalendar.picker.js"></script>

Add a reference on your input element for later use:

<input type="text" id="datepicker"/>

Then add this piece of code in your script tag:

<script>
  $(document).ready(function(){
    $('#datepicker').dcalendarpicker(); //Initializes the date picker
  });
</script>

Formatting

The default string format of the date is mm/dd/yyyy. You can specify the format you want by adding a parameter on initialization:

<script>
  $(document).ready(function(){
    $('#datepicker').dcalendarpicker({format: 'mm-dd-yyy'}); //Initializes the date picker and uses the specified format
  });
</script>

The above code will output a date in this format mm-dd-yyyy, for example: 10-31-2016 - which is October 31, 2016. You can specify other format you want, like mmm dd, yyyy which would output something like Oct 01, 2016.

Variable Code Output
Month m 1
mm 01
mmm Jan
mmmm January
Date d 1
dd 01
Year yy 16
yyyy 2016

Min and Max

You can also specify the mininum and/or maximum date the user can select on othe date picker. Just specify data-mindate and/or data-maxdate attributes on your input element. The acceptable values for these attributes are today or a specific date using this format: mm/dd/yyyy:

<input type="text" id="datepicker" data-mindate="today"/>       //Dates enabled ranges from the current date onwards.
<input type="text" id="datepicker" data-mindate="10/30/2016"/>  //Dates enabled ranges from October 30, 2016 onwards.
<input type="text" id="datepicker" data-maxdate="today"/>       //Dates enabled ranges from earlier dates until current date.
<input type="text" id="datepicker" data-maxdate="10/30/2016"/>  //Dates enabled ranges from previous dates of October 10, 2016 until October 10, 2016

You can also specify the mininum and maximum date to create a specific date range acceptable:

<input type="text" id="datepicker" data-mindate="1/1/2016" data-maxdate="2/1/2016"/>  //Dates enabled ranges from January 1 to February 1, 2016

Range From and To

For situations where you have two inputs representing a date range (from & to), you can restrict the minimum and maximum date based on the values of the input elements - the maximum allowed date for date from (input element) is the value of date to (input element), and the minimum allowed date for date to is the value of the date from input.

You can do this by adding the data-rangefrom and/or data-rangeto attributes. The value for these attributes is the id reference of the input element.

Example:

<input type="text" id="datefrom" data-rangeto="#dateto"/>   //Maximum enabled date is <= value of #dateto
<input type="text" id="dateto" data-rangefrom="#datefrom" data-maxdate="today"/>  //Minimum enabled date is >= value of #datefrom

Event

The event datechanged is fired after selection of date in the date picker. You can use this to get the new date value:

<script>
  $(document).ready(function(){
    $('#datepicker').dcalendarpicker({format: 'mm-dd-yyy'}).on('datechanged', function(e){
      alert(e.date);
    });
  });
</script>

The above code will alert the new date selected. For example: 01-16-2016 or January 16, 2016

Themes

You can specify the color theme of the date picker by adding theme option upon initialization:

<script>
  $(document).ready(function(){
    $('#datepicker').dcalendarpicker({theme: 'green'});
  });
</script>

Predefined themes are: red,blue (default), green, purple, indigo and teal. If you don't specify the theme to use or specify a theme which isn't there, the default theme will be used.

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].