-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e810c0f
commit 64ec313
Showing
7 changed files
with
736 additions
and
464 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@uiowa/date-range-picker", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"author": "Changhui Xu <[email protected]>", | ||
"contributors": [ | ||
"Jacob Feuerbach <[email protected]>" | ||
|
32 changes: 27 additions & 5 deletions
32
projects/uiowa/date-range-picker/src/lib/date-picker/date-picker.component.html
This file contains 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
This file contains 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
51 changes: 42 additions & 9 deletions
51
projects/uiowa/date-range-picker/src/lib/date-range-picker/date-range-picker.component.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,53 @@ | ||
<div class="input-group"> | ||
<input ngbDatepicker #dp="ngbDatepicker" type="text" class="form-control" style="max-width:200px;" readonly | ||
[disabled]="disabled" [autoClose]="false" [displayMonths]="2" [dayTemplate]="t" [showWeekNumbers]="false" | ||
[markDisabled]="isDisabled" [firstDayOfWeek]="7" (click)="dp.toggle()" (dateSelect)="onDateChange($event, dp)"> | ||
<input | ||
ngbDatepicker | ||
#dp="ngbDatepicker" | ||
type="text" | ||
class="form-control" | ||
style="max-width:208px;" | ||
readonly | ||
[disabled]="disabled" | ||
[autoClose]="false" | ||
[displayMonths]="2" | ||
[dayTemplate]="t" | ||
[showWeekNumbers]="false" | ||
[markDisabled]="isDisabled" | ||
[firstDayOfWeek]="7" | ||
(click)="dp.toggle()" | ||
(dateSelect)="onDateChange($event, dp)" | ||
/> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-secondary d-flex align-items-center" (click)="dp.toggle()" type="button"> | ||
<svg aria-hidden="true" role="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"> | ||
<path fill="currentColor" d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"></path> | ||
<button | ||
class="btn btn-outline-secondary d-flex align-items-center" | ||
(click)="dp.toggle()" | ||
type="button" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
role="icon" | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 448 512" | ||
> | ||
<path | ||
fill="currentColor" | ||
d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z" | ||
></path> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<ng-template #t let-date="date" let-focused="focused" let-disabled="disabled"> | ||
<span class="custom-day" [class.focused]="focused" [class.range]="isFrom(date) || isTo(date) || isInside(date) || isHovered(date)" | ||
[class.faded]="isHovered(date) || isInside(date)" [class.weekend]="isWeekend(date)" [class.disabled]="disabled" | ||
(mouseenter)="hoveredDate = date" (mouseleave)="hoveredDate = null"> | ||
<span | ||
class="custom-day" | ||
[class.focused]="focused" | ||
[class.range]="isFrom(date) || isTo(date) || isInside(date) || isHovered(date)" | ||
[class.faded]="isHovered(date) || isInside(date)" | ||
[class.weekend]="isWeekend(date)" | ||
[class.disabled]="disabled" | ||
(mouseenter)="hoveredDate = date" | ||
(mouseleave)="hoveredDate = null" | ||
> | ||
{{ date.day }} | ||
</span> | ||
</ng-template> |
This file contains 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