aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/calendar.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2017-04-12 22:47:27 +0200
committerFelix Nagel <info@felixnagel.com>2017-04-12 22:47:27 +0200
commit5ee64dd0e0743643f3e314d898b45669b4db0a49 (patch)
treea4aac07a71ba915e1c3bc72ccd5d71ab64026454 /ui/widgets/calendar.js
parentc1cb6e3398cf3f68e25d375f1e2dce1830fc95f4 (diff)
downloadjquery-ui-5ee64dd0e0743643f3e314d898b45669b4db0a49.tar.gz
jquery-ui-5ee64dd0e0743643f3e314d898b45669b4db0a49.zip
Calendar: Introduce build methods for year and month title
Diffstat (limited to 'ui/widgets/calendar.js')
-rw-r--r--ui/widgets/calendar.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/widgets/calendar.js b/ui/widgets/calendar.js
index df919cb99..fb74f2a48 100644
--- a/ui/widgets/calendar.js
+++ b/ui/widgets/calendar.js
@@ -366,8 +366,8 @@ return $.widget( "ui.calendar", {
_buildTitle: function() {
var title = $( "<div>", { role: "alert", id: this.gridId + "-month-label" } ),
- month = $( "<span>" ).text( this.viewDate.monthName() ),
- year = $( "<span>" ).text( this.viewDate.year() );
+ month = this._buildTitleMonth(),
+ year = this._buildTitleYear();
this._addClass( title, "ui-calendar-title" )
._addClass( month, "ui-calendar-month" )
@@ -379,6 +379,14 @@ return $.widget( "ui.calendar", {
.append( year );
},
+ _buildTitleMonth: function() {
+ return $( "<span>" ).text( this.viewDate.monthName() );
+ },
+
+ _buildTitleYear: function() {
+ return $( "<span>" ).text( this.viewDate.year() );
+ },
+
_buildGrid: function() {
var table = $( "<table>", {
role: "grid",