jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

Additional calFormatter improvements. #344

Closed slavap closed 10 years ago

slavap commented 10 years ago

It should be possible to return from calFormatter not only formatted String (already implemented), but also object with the following structure: { fmtText: '21', dateClasses: 'aaa bbb ccc' } These dateClasses should be added with addClass() to griddate cell. That way it will be much easier to define extended CSS styling based on date data content (coloring, shape, ...).

jtsage commented 10 years ago

yes. I like this - will add. I think for the object, simple is better -

{
  text: "Whatever, including html",
  class: "myclass1 myclass2",
}
jtsage commented 10 years ago

As per usual, details of the return value are here: http://dev.jtsage.com/jQM-DateBox/api/calFormatter/