mercadolibre / chico

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

Calendar does not allow to set default configuration about monthsNames and weekdays #1208

Open lquintana opened 10 years ago

lquintana commented 10 years ago
/**
 * possible and momentary solution
 * @weekdays = []
 * @monthNames = [] 
 */
ch.Calendar.prototype._defaults = {
        'monthsNames': monthsNames,
        'weekdays': weekdays,
        'format': 'DD/MM/YYYY'
};
hmammana commented 9 years ago

The problem isn't in the code that is pasted on the comment. The problem is in the following lines https://github.com/mercadolibre/chico/blob/master/src/shared/js/Calendar.js#L446 https://github.com/mercadolibre/chico/blob/master/src/shared/js/Calendar.js#L459 It have to get the ._options instead ._defaults