Last active
April 12, 2017 21:15
-
-
Save alexdiliberto/8ac62916757f688428aa048d2ac5a2d3 to your computer and use it in GitHub Desktop.
Datepicker: Ember Power Datepicker v0.2.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import moment from 'moment'; | |
let today = moment(); | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
selected: today | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
/* ember-basic-dropdown START */ | |
.ember-basic-dropdown { | |
position: relative; | |
} | |
.ember-basic-dropdown, .ember-basic-dropdown-content, .ember-basic-dropdown-content * { | |
box-sizing: border-box; | |
} | |
.ember-basic-dropdown-content { | |
position: absolute; | |
width: auto; | |
z-index: 1000; | |
background-color: #FFF; | |
} | |
.ember-basic-dropdown-content--left { | |
left: 0; | |
} | |
.ember-basic-dropdown-content--right { | |
right: 0; | |
} | |
.ember-basic-dropdown-overlay { | |
position: fixed; | |
background: rgba(0, 0, 0, 0.5); | |
width: 100%; | |
height: 100%; | |
z-index: 10; | |
top: 0; | |
left: 0; | |
pointer-events: none; | |
} | |
.ember-basic-dropdown-content-wormhole-origin { | |
display: inline; | |
} | |
/* ember-basic-dropdown END */ | |
/* ember-power-calendar START */ | |
.ember-power-calendar { | |
box-sizing: border-box; | |
position: relative; | |
} | |
.ember-power-calendar-nav { | |
box-sizing: border-box; | |
display: flex; | |
justify-content: space-between; | |
} | |
.ember-power-calendar-nav * { | |
box-sizing: border-box; | |
} | |
.ember-power-calendar-days, .ember-power-calendar-days * { | |
box-sizing: border-box; | |
} | |
.ember-power-calendar-nav-title { | |
flex: 1; | |
text-align: center; | |
} | |
.ember-power-calendar-row { | |
display: flex; | |
justify-content: space-between; | |
} | |
.ember-power-calendar-weekday { | |
-webkit-appearance: none; | |
flex: 1 1 100%; | |
padding: 0; | |
background-color: transparent; | |
background-color: initial; | |
border: none; | |
border: initial; | |
outline: none; | |
outline: initial; | |
justify-content: center; | |
display: flex; | |
align-items: center; | |
padding: 0; | |
} | |
.ember-power-calendar-day { | |
-webkit-appearance: none; | |
background-color: transparent; | |
background-color: initial; | |
border: none; | |
border: initial; | |
outline: none; | |
outline: initial; | |
flex: 1 1 100%; | |
font-size: inherit; | |
align-items: center; | |
justify-content: center; | |
padding: 0; | |
} | |
.ember-power-calendar-nav-control { | |
-webkit-appearance: none; | |
background-color: transparent; | |
background-color: initial; | |
border: none; | |
border: initial; | |
outline: none; | |
outline: initial; | |
font-size: inherit; | |
} | |
.ember-power-calendar { | |
font-size: 14px; | |
line-height: 1.42857; | |
} | |
.ember-power-calendar-weekdays { | |
color: #333333; | |
} | |
.ember-power-calendar-day { | |
color: #bbb; | |
} | |
.ember-power-calendar-nav { | |
line-height: 2; | |
} | |
.ember-power-calendar-nav-control { | |
line-height: 1; | |
font-size: 150%; | |
color: #0078c9; | |
} | |
.ember-power-calendar-nav-control:focus { | |
transform: scale(1.2); | |
color: #0096fc; | |
} | |
.ember-power-calendar-day--current-month { | |
color: #656D78; | |
background-color: #F5F7FA; | |
} | |
.ember-power-calendar-day--today, | |
.ember-power-calendar-day:not([disabled]):hover { | |
background-color: #eee; | |
} | |
.ember-power-calendar-day--other-month:not([disabled]):hover { | |
color: #aaa; | |
} | |
.ember-power-calendar-day--selected, | |
.ember-power-calendar-day--selected:not([disabled]):hover { | |
font-weight: bold; | |
background-color: #c9e9ff; | |
color: #656D78; | |
} | |
.ember-power-calendar-day--selected.ember-power-calendar-day--range-start, | |
.ember-power-calendar-day--selected.ember-power-calendar-day--range-end { | |
background-color: #96d5ff; | |
} | |
.ember-power-calendar-day--selected.ember-power-calendar-day--range-start:hover, | |
.ember-power-calendar-day--selected.ember-power-calendar-day--range-end:hover { | |
background-color: #96d5ff; | |
} | |
.ember-power-calendar-day--focused { | |
box-shadow: inset 0px -2px 0px 0px #0078c9; | |
} | |
.ember-power-calendar-day--interactive[disabled] { | |
opacity: 0.4; | |
} | |
.demo-calendar-small { | |
width: 222px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:first-child[data-missing-days="1"] { | |
padding-left: 32px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:first-child[data-missing-days="2"] { | |
padding-left: 64px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:first-child[data-missing-days="3"] { | |
padding-left: 96px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:first-child[data-missing-days="4"] { | |
padding-left: 128px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:first-child[data-missing-days="5"] { | |
padding-left: 160px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:first-child[data-missing-days="6"] { | |
padding-left: 192px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:last-child[data-missing-days="1"] { | |
padding-right: 32px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:last-child[data-missing-days="2"] { | |
padding-right: 64px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:last-child[data-missing-days="3"] { | |
padding-right: 96px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:last-child[data-missing-days="4"] { | |
padding-right: 128px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:last-child[data-missing-days="5"] { | |
padding-right: 160px; | |
} | |
.demo-calendar-small .ember-power-calendar-week:last-child[data-missing-days="6"] { | |
padding-right: 192px; | |
} | |
.demo-calendar-small .ember-power-calendar-day, .demo-calendar-small .ember-power-calendar-weekday { | |
max-width: 30px; | |
max-height: 30px; | |
width: 30px; | |
height: 30px; | |
} | |
.demo-calendar-small .ember-power-calendar-weekdays, .demo-calendar-small .ember-power-calendar-week { | |
height: 32px; | |
padding-left: 0; | |
padding-right: 0; | |
} | |
.demo-calendar-medium { | |
width: 362px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:first-child[data-missing-days="1"] { | |
padding-left: 52px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:first-child[data-missing-days="2"] { | |
padding-left: 104px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:first-child[data-missing-days="3"] { | |
padding-left: 156px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:first-child[data-missing-days="4"] { | |
padding-left: 208px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:first-child[data-missing-days="5"] { | |
padding-left: 260px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:first-child[data-missing-days="6"] { | |
padding-left: 312px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:last-child[data-missing-days="1"] { | |
padding-right: 52px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:last-child[data-missing-days="2"] { | |
padding-right: 104px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:last-child[data-missing-days="3"] { | |
padding-right: 156px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:last-child[data-missing-days="4"] { | |
padding-right: 208px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:last-child[data-missing-days="5"] { | |
padding-right: 260px; | |
} | |
.demo-calendar-medium .ember-power-calendar-week:last-child[data-missing-days="6"] { | |
padding-right: 312px; | |
} | |
.demo-calendar-medium .ember-power-calendar-day, .demo-calendar-medium .ember-power-calendar-weekday { | |
max-width: 50px; | |
max-height: 50px; | |
width: 50px; | |
height: 50px; | |
} | |
.demo-calendar-medium .ember-power-calendar-weekdays, .demo-calendar-medium .ember-power-calendar-week { | |
height: 52px; | |
padding-left: 0; | |
padding-right: 0; | |
} | |
.demo-calendar-big { | |
width: 502px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:first-child[data-missing-days="1"] { | |
padding-left: 72px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:first-child[data-missing-days="2"] { | |
padding-left: 144px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:first-child[data-missing-days="3"] { | |
padding-left: 216px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:first-child[data-missing-days="4"] { | |
padding-left: 288px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:first-child[data-missing-days="5"] { | |
padding-left: 360px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:first-child[data-missing-days="6"] { | |
padding-left: 432px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:last-child[data-missing-days="1"] { | |
padding-right: 72px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:last-child[data-missing-days="2"] { | |
padding-right: 144px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:last-child[data-missing-days="3"] { | |
padding-right: 216px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:last-child[data-missing-days="4"] { | |
padding-right: 288px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:last-child[data-missing-days="5"] { | |
padding-right: 360px; | |
} | |
.demo-calendar-big .ember-power-calendar-week:last-child[data-missing-days="6"] { | |
padding-right: 432px; | |
} | |
.demo-calendar-big .ember-power-calendar-day, .demo-calendar-big .ember-power-calendar-weekday { | |
max-width: 70px; | |
max-height: 70px; | |
width: 70px; | |
height: 70px; | |
} | |
.demo-calendar-big .ember-power-calendar-weekdays, .demo-calendar-big .ember-power-calendar-week { | |
height: 72px; | |
padding-left: 0; | |
padding-right: 0; | |
} | |
/* ember-power-calendar END */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-power-datepicker": "0.2.2", | |
"ember-moment": "7.0.1", | |
"ember-composable-helpers": "2.0.1", | |
"ember-truth-helpers": "1.3.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment