Skip to content

rikulo/bootjack-datepicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bootjack Datepicker

Bootjack datepicker component is a datepicker component of Bootjack.

Install from Dart Pub Repository

Include the following in your pubspec.yaml:

dependencies:
  bootjack_datepicker: any

Then run the Pub Package Manager in Dart Editor (Tool > Pub Install). If you are using a different editor, run the command (comes with the Dart SDK):

pub install

Usage

First of all in your HTML file, you need to include the CSS resource:

	<head>
		...
		<link rel="stylesheet" href="packages/bootjack_datepicker/css/bootjack-datepicker.min.css">
	</head>

Embedded calendar

To create a calendar component to your HTML page, add class="calendar" to the element you want to attach to (most typically this would be the <div>), then you can specify data-date and data-format to the element for specify a default value and date format.

	<div class="calendar" data-date="2013/09/16" data-format="yyyy/MM/dd"></div>

Then call the following global registration in Dart:

	void main() {
		Calendar.use();

Datepicker

Using a calendar component in a dropdown div element as a date picker component, add class="calendar" to the element you want to attach to, then add the data-target attribute with the ID or class of the element that you want to display the date value.

	<div class="input-group">
		
	  <input id="inp" type="text" class="form-control">
	  
	  <div class="input-group-btn">
		
		<button id="btn" class="btn btn-default dropdown-toggle" 
			type="button" data-toggle="dropdown">
		  <span class="glyphicon glyphicon-calendar"></span>
		</button>
		
		<div class="dropdown-menu" >
			<div class="calendar" data-date="2013/09/16" data-format="yyyy/MM/dd"
				data-target="#inp"></div>
		</div>
		
	  </div>
	</div>

Then call the following global registration in Dart:

	void main() {
		Calendar.use();
	}

Check more examples.

Notes to Contributors

Test and Debug

You are welcome to submit bugs and feature requests. Or even better if you can fix or implement them!

Fork Bootjack Datepicker

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Rikulo's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Who Uses

  • Quire - a simple, collaborative, multi-level task management tool.
  • Keikai - a sophisticated spreadsheet for big data