Skip to content

Latest commit

 

History

History
140 lines (99 loc) · 4.05 KB

CHANGELOG.md

File metadata and controls

140 lines (99 loc) · 4.05 KB

Changelog

5.0.2

  • Fix sibling months day click gave incorrect date

5.0.1

  • Globals are evil. By trying to make things easy to use, we declared a global window.DPicker variable. Since 5.0.1 it's not the case anymore and it will be declared as window.dpicker. It's recommended that you use a bundle system though (webpack, rollup, browserify...).

  • Plugins are exporting a function. Makes things easier to pre-build packages. This means that this won't work anymore:

<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dpicker.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dpicker.time.min.js"></script>

To get date + time, you should use:

<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dpicker.datetime.min.js"></script>

Or the package with every module:

<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dpicker.datetime.all.js"></script>

5.0.0

  • Use browserify instead of gulp
  • Use real dom, real dates (nanomorph for diffing and bel
  • Use standard
  • Get rid of momentjs hard dependency (still required for now)
  • Implement a Date Adapter for future libraries support
  • Simplify plugins api
  • uses immutable Date instances internally! [BC]

No more _modules stuff. Just simple objects creation:

DPicker.renders.closeButton = function renderCloseButton(events, data) {
  const button = document.createElement('button')
  button.innerText = 'Confirm'
  button.type = 'button'
  button.classList.add('dpicker-close-button')
  button.addEventListener('click', events.hidePicker)
  return button
}

DPicker.events.hidePicker = function hidePicker() {
  this.display = false
}
  • Incremental builds

You can use dpicker.datetime.js directly. Coming soon builds with date-fns. Available builds:

dist/dpicker.all.min.js.gz:  7.698 kb
dist/dpicker.arrow-navigation.min.js.gz:  0.9410000000000001 kb
dist/dpicker.core.min.js.gz:  4.892 kb
dist/dpicker.datetime.min.js.gz:  6.947 kb
dist/dpicker.min.js.gz:  5.699 kb
dist/dpicker.modifiers.min.js.gz:  0.58 kb
dist/dpicker.navigation.min.js.gz:  0.6900000000000001 kb
dist/dpicker.time.min.js.gz:  2.08 kb
dist/polyfills.min.js.gz:  4.5200000000000005 kb

_events => events _data => data

  • new getter for empty

4.2.0

onChange now has a second argument giving informations about the recent change, for example:

dpicker.onChange = function(data, event) {
  console.log('Model changed? %s', event.modelChanged ? 'yes' : 'no')
  console.log('DPicker event: %s', event.name)
  console.log('DPicker original event: %s', event.event)
}

4.0.9

  • Adds an option to enable sibling month days

4.0.8

  • Adds an option concatHoursAndMinutes to merge hours and minutes in one select

4.0.0

  • Drop hyperscript library, it's not needed anymore and it's not possible to add a custom one
  • An invalid Date doesn't reset the value to the closest correct one, it leaves the choice to the user instead
  • A class .invalid is added to the input
  • aria-* attributes are now working

3.1.1

Add touch friendly behavior #20

3.1.0

Drop maquettejs hard dependency (see #1). You can now use your own hyperscript library, for example with mithriljs:

let dpicker = DPicker(label, {
  h: mithril,
  mount: function(element, toRender) {
    mithril.render(element, toRender())
  },
  redraw: mithril.redraw
})

3.0.0

time-format renamed to meridiem

2.0.0

isEmpty renamed empty

1.3.0

Drop previousYear and futureYear. Those are replaced by min and max:

  • input[type="date"] polyfill (#2)
  • allows to change the months selection on max/min dates