mercadolibre / chico

A collection of easy-to-use UI components.
http://chico.mercadolibre.com
MIT License
343 stars 87 forks source link

Update Datepicker.js #1243

Closed ghost closed 7 years ago

ghost commented 9 years ago

Calendar doesn't have a reset method.

atma commented 9 years ago

Instead of removing the call to reset method maybe better to add this method to a Calendar component that will set the date to something neutral, e.g. an initial date from options or today.

Calendar.prototype.reset = function() {
  this.select('today');
}

As an alternative the select method can be called directly from Datepicker, e.g.

this._calendar.select('today');

So in this way the Datepicker will look synchronised with the Calendar.

battaglr commented 7 years ago

I'll close this due to inactivity. If it's still relevant, please, feel free to comment.