Skip to content
Closed
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a7d9fa4
Added Calendar module
mdehoog Oct 28, 2015
c996e88
Support for clearing a selected date
mdehoog Oct 28, 2015
80775ab
Switches to inline automatically if no popup activator element found …
mdehoog Oct 28, 2015
30117b4
Reduced header icon margin to 0
mdehoog Oct 29, 2015
096d793
Added time support and year/month views
mdehoog Oct 29, 2015
6082e51
Fixed floating prev/next buttons for inline mode
mdehoog Oct 29, 2015
9624f1d
Separated header formatters for different view modes
mdehoog Oct 30, 2015
07e3893
Ensure correct month/year when parsing date
mdehoog Oct 30, 2015
029e1ff
Date is set to initial value of input on module instantiation
mdehoog Oct 30, 2015
90ac3a2
Added 'month' and 'year' calendar types
mdehoog Nov 7, 2015
124bcae
Added date range support
mdehoog Nov 8, 2015
cc0da89
Fixed focus date for touch devices, improved focus date update perfor…
mdehoog Nov 9, 2015
dab90ac
Changed default popup 'on' value to 'focus' for inputs
mdehoog Nov 9, 2015
52f16d0
Moved selectDate function out of set object for consistency
mdehoog Nov 9, 2015
2f62e99
Disabled popup hideOnScroll
mdehoog Nov 9, 2015
f43a0fb
Fixed unbind.events call
mdehoog Nov 10, 2015
ff5dd6d
Show popup on input click event
mdehoog Nov 11, 2015
28426bb
Added license header to calendar.less
mdehoog Nov 24, 2015
49178d6
Return null instead of undefined for date getters
mdehoog Feb 10, 2016
5b89799
Pass settings object to parser.date function
mdehoog Jul 31, 2016
415c668
Fixed Math.max returning number instead of date
mdehoog Oct 3, 2016
a41b7de
Disabled selecting minutes below minDate if minDate minutes are not d…
mdehoog Oct 4, 2016
d4c9728
Updated module common functions to match changes made to other modules
mdehoog Oct 10, 2016
0a5d6bb
Add 'adjacent' class to day cells that are from adjacent months
mdehoog Oct 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/definitions/globals/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ $.site.settings = {
modules: [
'accordion',
'api',
'calendar',
'checkbox',
'dimmer',
'dropdown',
Expand Down
1,281 changes: 1,281 additions & 0 deletions src/definitions/modules/calendar.js

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions src/definitions/modules/calendar.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/*!
* # Semantic UI - Calendar
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/

/*******************************
Theme
*******************************/

@type : 'module';
@element : 'calendar';

@import (multiple) '../../theme.config';

/*******************************
Popup
*******************************/

.ui.calendar .ui.popup {
max-width: none;
padding: 0;
border: none;
user-select: none;
}

/*******************************
Calendar
*******************************/

.ui.calendar .calendar:focus {
outline: 0;
}

/*******************************
Table
*******************************/

.ui.calendar .ui.table.year,
.ui.calendar .ui.table.month,
.ui.calendar .ui.table.minute {
min-width: 15em;
}

.ui.calendar .ui.table.day {
min-width: 18em;
}

.ui.calendar .ui.table.hour {
min-width: 20em;
}

.ui.calendar .ui.table tr th,
.ui.calendar .ui.table tr td {
padding: 0.5em;
white-space: nowrap;
}

.ui.calendar .ui.table tr th {
border-left: none;
}

.ui.calendar .ui.table tr th .icon {
margin: 0;
}

.ui.calendar .ui.table tr th .icon {
margin: 0;
}

.ui.calendar .ui.table tr:first-child th {
position: relative;
padding-left: 0;
padding-right: 0;
}

.ui.calendar .ui.table.day tr:first-child th {
border: none;
}

.ui.calendar .ui.table.day tr:nth-child(2) th {
padding-top: 0.2em;
padding-bottom: 0.3em;
}

.ui.calendar .ui.table tr td {
padding-left: 0.1em;
padding-right: 0.1em;
}

.ui.calendar .ui.table tr .link {
cursor: pointer;
}

.ui.calendar .ui.table tr .prev.link {
width: 14.28571429%;
position: absolute;
left: 0;
}

.ui.calendar .ui.table tr .next.link {
width: 14.28571429%;
position: absolute;
right: 0;
}

.ui.calendar .ui.table tr .disabled {
pointer-events: none;
color: @disabledTextColor;
}

/*--------------
States
---------------*/

.ui.calendar .ui.table tr td.today {
font-weight: @todayFontWeight;
}

.ui.calendar .ui.table tr td.range {
background: @rangeBackground;
color: @rangeTextColor;
box-shadow: @rangeBoxShadow;
}

.ui.calendar .ui.table.inverted tr td.range {
background: @rangeInvertedBackground;
color: @rangeInvertedTextColor;
box-shadow: @rangeInvertedBoxShadow;
}

.ui.calendar .calendar:focus .ui.table tbody tr td.focus,
.ui.calendar .calendar.active .ui.table tbody tr td.focus {
box-shadow: @focusBoxShadow;
}

.ui.calendar .calendar:focus .ui.table.inverted tbody tr td.focus,
.ui.calendar .calendar.active .ui.table.inverted tbody tr td.focus {
box-shadow: @focusInvertedBoxShadow;
}

.loadUIOverrides();
1 change: 1 addition & 0 deletions src/semantic.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

/* Modules */
& { @import "definitions/modules/accordion"; }
& { @import "definitions/modules/calendar"; }
& { @import "definitions/modules/checkbox"; }
& { @import "definitions/modules/dimmer"; }
& { @import "definitions/modules/dropdown"; }
Expand Down
1 change: 1 addition & 0 deletions src/theme.config.example
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

/* Modules */
@accordion : 'default';
@calendar : 'default';
@checkbox : 'default';
@dimmer : 'default';
@dropdown : 'default';
Expand Down
3 changes: 3 additions & 0 deletions src/themes/default/modules/calendar.overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*******************************
Theme Overrides
*******************************/
15 changes: 15 additions & 0 deletions src/themes/default/modules/calendar.variables
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*******************************
Calendar
*******************************/

@focusBoxShadow: inset 0 0 0 1px @focusedFormBorderColor;
@focusInvertedBoxShadow: inset 0 0 0 1px @focusedFormBorderColor;

@todayFontWeight: bold;

@rangeBackground: @transparentBlack;
@rangeTextColor: @selectedTextColor;
@rangeBoxShadow: none;
@rangeInvertedBackground: @transparentWhite;
@rangeInvertedTextColor: @invertedSelectedTextColor;
@rangeInvertedBoxShadow: none;
1 change: 1 addition & 0 deletions tasks/config/admin/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
'api',
'breadcrumb',
'button',
'calendar',
'card',
'checkbox',
'comment',
Expand Down
1 change: 1 addition & 0 deletions tasks/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module.exports = {

// modules
'accordion',
'calendar',
'checkbox',
'dimmer',
'dropdown',
Expand Down
1 change: 1 addition & 0 deletions tasks/config/project/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ module.exports = {
{ name: "item", checked: true },
{ name: "statistic", checked: true },
{ name: "accordion", checked: true },
{ name: "calendar", checked: true },
{ name: "checkbox", checked: true },
{ name: "dimmer", checked: true },
{ name: "dropdown", checked: true },
Expand Down