This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(datepicker): Added datepicker component.
Fixes #894
- Loading branch information
1 parent
4c5b4e6
commit 244043b
Showing
66 changed files
with
3,442 additions
and
2 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<h1>Datepicker</h1> | ||
|
||
<h2>Full datepicker</h2> | ||
|
||
<dt-datepicker | ||
[startAt]="startAt" | ||
[disabled]="isDatepickerDisabled" | ||
[isTimeEnabled]="isDatepickerTimeEnabled" | ||
></dt-datepicker> | ||
|
||
<dt-checkbox [(ngModel)]="isDatepickerDisabled">Disabled</dt-checkbox> | ||
<dt-checkbox [(ngModel)]="isDatepickerTimeEnabled" | ||
>Enabled Time Mode</dt-checkbox | ||
> | ||
|
||
<h2>Calendar</h2> | ||
|
||
<dt-calendar [startAt]="startAt"></dt-calendar> | ||
|
||
<h2>Calendar body only</h2> | ||
|
||
<dt-calendar-body [activeDate]="startAt"></dt-calendar-body> | ||
|
||
<h2>Timepicker</h2> | ||
|
||
<dt-timepicker [disabled]="isTimepickerDisabled"></dt-timepicker> | ||
|
||
<dt-checkbox [(ngModel)]="isTimepickerDisabled">Disabled</dt-checkbox> | ||
|
||
<div dtTheme=":dark" class="dt-example-dark"> | ||
<h2>Full Dark Mode Datepicker</h2> | ||
|
||
<dt-datepicker | ||
[startAt]="startAt" | ||
[disabled]="isDarkDatepickerDisabled" | ||
[isTimeEnabled]="isDarkDatepickerTimeEnabled" | ||
></dt-datepicker> | ||
<dt-checkbox [(ngModel)]="isDarkDatepickerDisabled">Disabled</dt-checkbox> | ||
<dt-checkbox [(ngModel)]="isDarkDatepickerTimeEnabled" | ||
>Enabled Time Mode</dt-checkbox | ||
> | ||
|
||
<h2>Dark Mode Calendar</h2> | ||
|
||
<dt-calendar [startAt]="startAt"></dt-calendar> | ||
|
||
<h2>Dark Mode Calendar Body Only</h2> | ||
|
||
<dt-calendar-body [activeDate]="startAt"></dt-calendar-body> | ||
|
||
<h2>Dark Mode Timepicker</h2> | ||
|
||
<dt-timepicker | ||
dtTheme=":dark" | ||
[disabled]="isDarkTimepickerDisabled" | ||
></dt-timepicker> | ||
<dt-checkbox [(ngModel)]="isDarkTimepickerDisabled">Disabled</dt-checkbox> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.dt-checkbox { | ||
margin-top: 10px; | ||
} | ||
|
||
.dt-example-dark h2 { | ||
color: white; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* @license | ||
* Copyright 2020 Dynatrace LLC | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-component', | ||
templateUrl: 'datepicker-demo.component.html', | ||
styleUrls: ['datepicker-demo.component.scss'], | ||
}) | ||
export class DatepickerDemo { | ||
startAt = new Date(2020, 7, 31); | ||
isDatepickerDisabled = false; | ||
isTimepickerDisabled = false; | ||
isDarkDatepickerDisabled = false; | ||
isDarkTimepickerDisabled = false; | ||
isDatepickerTimeEnabled = true; | ||
isDarkDatepickerTimeEnabled = true; | ||
} |
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
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
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
Oops, something went wrong.