@include valo-datefield-calendarpanel-day-focused-style;
}
-
+ .#{$primary-stylename}-day.#{$primary-stylename}-day-outside-range,
+ .#{$primary-stylename}-day.#{$primary-stylename}-day-outside-range:hover {
+ @include valo-datefield-calendarpanel-outside-range-style;
+ }
.#{$primary-stylename}-weekdays {
height: round($v-unit-size * 0.7);
}
}
-
.#{$primary-stylename}-header {
white-space: nowrap;
}
- td[class$="year"],
- td[class$="month"] {
+ td[class*="year"],
+ td[class*="month"] {
button {
@include appearance(none);
border: none;
}
}
- &:hover {
- @include opacity(1);
- &:before {
- color: $v-focus-color;
+ &:hover:before {
+ color: $v-focus-color;
+ }
+
+ &.outside-range {
+ cursor: default;
+ @include opacity(.3);
+
+ &:hover:before {
+ color: mix($v-background-color, valo-font-color($v-background-color));
}
}
}
background: transparent;
}
+/**
+ * Outputs the styles for an individual day element, which are outside available range.
+ *
+ * @group datefield
+ */
+@mixin valo-datefield-calendarpanel-outside-range-style {
+ color: mix(valo-font-color($v-background-color), $v-background-color);
+ cursor: not-allowed;
+}
/**
* Outputs the styles for todays day element in a calendar panel.
date = new InlineDateField("Date picker");
setDate(date);
+ setDateRange(date);
row.addComponent(date);
date = new InlineDateField("Date picker with week numbers");
row.addComponent(form);
}
+ private void setDateRange(DateField date) {
+ date.setRangeStart(getDefaultDate());
+
+ Date endDate = getDefaultDate();
+ endDate.setMonth(endDate.getMonth() + 1);
+ date.setRangeEnd(endDate);
+ }
+
private void setDate(DateField date) {
date.setValue(getDefaultDate());
}
// Note that this can look broken in IE9 because of some browser
// rendering issue... The problem seems to be in the customized
// horizontal layout in the test app
- compareScreen("datefields-with-disabled");
+ compareScreen("datefields-with-range");
}
@Test