Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #72 from aratak/sun-mon-tue

Improve possibilities for the day of week formatting
  • Loading branch information...
commit 69232c7fc286e78c54a2bdbb6aff5189c96843a3 2 parents 2a3e08d + a330fa1
@ChiperSoft authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 readme.md
  2. +2 −2 src/main.js
View
4 readme.md
@@ -128,9 +128,9 @@ The following options are available for configuration.
The following settings alter the internal behavior of Kalendae and should only be changed by advanced users.
-- `columnHeaderLength`: The number of characters of the week day name to display in column headers.
- - Default is `2`
+- `columnHeaderFormat`: The format of moment data of the week day name to display in column headers.
+ - Default is `dd`
- `titleFormat`: Format string used in the calendar title.
- Default is `"MMMM, YYYY"`
View
4 src/main.js
@@ -35,7 +35,7 @@ var Kalendae = function (targetElement, options) {
//generate the column headers (Su, Mo, Tu, etc)
i = 7;
while (i--) {
- columnHeaders.push( startDay.format('ddd').substr(0,opts.columnHeaderLength) );
+ columnHeaders.push( startDay.format(opts.columnHeaderFormat) );
startDay.add('days',1);
}
@@ -228,7 +228,7 @@ Kalendae.prototype = {
format: null, /* string used for parsing dates. */
subscribe: null, /* object containing events to subscribe to */
- columnHeaderLength: 2, /* number of characters to show in the column headers */
+ columnHeaderFormat: 'dd', /* number of characters to show in the column headers */
titleFormat: 'MMMM, YYYY', /* format mask for month titles. See momentjs.com for rules */
dayNumberFormat: 'D', /* format mask for individual days */
dayAttributeFormat: 'YYYY-MM-DD', /* format mask for the data-date attribute set on every span */
Please sign in to comment.
Something went wrong with that request. Please try again.