bootjack_datepicker 1.0.1+6

  • Readme
  • Changelog
  • Installing
  • 67

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

#CHANGES

1.0.2

  • Fixed wrong cursor position when type 00 in hour field
  • Keep focus in hour field if only type 1 digit
  • Don't parse 18 to 6 pm, it shall be 01:08 am

1.0.1

  • Support set firstDayOfWeek
  • Timepicker support AM/PM

1.0.0

  • Dart 2 required

*0.5.9

  • Fixed pass a wrong date when render year view

*0.5.8

  • Timepicker support null value
  • Set time to null when keep pressing backspace
  • Fixed pick year error when value is null

*0.5.7

  • Fixed render first day of week with Sat
  • Support timepicker

0.5.6

  • Fixed table content do not render correctly
  • Fixed mouse wheel event
  • Support first day of week

0.5.5

  • Support chang date view and shift date view event
  • Fixed DST timezone date render issue

0.5.4

  • Support Dquery 0.7.0

0.5.3

  • Upgrade for Dart SDK 1.0
  • Apply new style.
  • Fixed dropdown doesn't trigger close event
  • Fine tune calendar event data
  • Apply today class
  • Support renderSelectedDay, renderToDay
  • Fixed pick previous year bug
  • Fixed navigate date by click right/left arrow bug

0.5.2

  • Apply new implement for datepicker component, remove Datepicker class.

0.5.1

  • Create datepicker component

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  bootjack_datepicker: ^1.0.1+6

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:bootjack_datepicker/bootjack_datepicker.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
58
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
75
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/timepicker.dart. (-21.78 points)

Analysis of lib/src/timepicker.dart reported 49 hints, including:

line 6 col 3: Prefer using /// for doc comments.

line 15 col 8: Unnecessary new keyword.

line 18 col 3: Prefer using /// for doc comments.

line 22 col 3: Prefer using /// for doc comments.

line 26 col 3: Prefer using /// for doc comments.

Fix lib/src/calendar.dart. (-18.17 points)

Analysis of lib/src/calendar.dart reported 40 hints, including:

line 3 col 1: Prefer using /// for doc comments.

line 82 col 3: Prefer using /// for doc comments.

line 86 col 3: Avoid return types on setters.

line 89 col 15: Unnecessary new keyword.

line 93 col 3: Prefer using /// for doc comments.

Format lib/bootjack_datepicker.dart.

Run dartfmt to format lib/bootjack_datepicker.dart.

Format lib/bootjack_timepicker.dart.

Run dartfmt to format lib/bootjack_timepicker.dart.

Maintenance issues and suggestions

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 4 dependencies without version constraints. Specify version ranges for the following dependencies: bootjack, dquery, intl, rikulo_commons.

Documentation URL is insecure. (-5 points)

Update the documentation field and use a secure (https) URL.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and bootjack_datepicker.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
bootjack any 1.0.1
dquery any 1.0.0+1
intl any 0.16.1
rikulo_commons any 4.0.1
Transitive dependencies
charcode 1.1.2
logging 0.11.4
mime 0.9.6+3
path 1.6.4