-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(datepicker): Add optional "today" button (#5786)
* add optional configuration for datepicker 'today' button sampled heavily from quartepie #5024 * add datepicker today html and css * add tests for optional datepicker today button and function * remove unused code * feat(datepicker): Add optional "today" button config sampled heavily from quartepie #5024 * feat(datepicker): Add optional "today" button html/css * feat(datepicker): Add optional "today" button tests * feat(datepicker): Add optional "today" button tests * feat(datepicker): Add optional "today" button demo and docs * feat(datepicker): Add optional "today" button tests fixed failing test * feat(datepicker): Add optional "today" ng-api-docs update * feat(datepicker): Add optional "today" button: auto generated ng-api-docs.ts file * feat(datepicker): add optional positioning for Today button Co-authored-by: Peter Linnehan <pjl@pjl-macbook-pro.lan> Co-authored-by: Dmitriy Danilov <daniloff200@gmail.com>
- Loading branch information
1 parent
2c1b2bd
commit 41e7a0b
Showing
11 changed files
with
143 additions
and
8 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
9 changes: 9 additions & 0 deletions
9
demo/src/app/components/+datepicker/demos/today-button/today-button.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="row"> | ||
<div class="col-xs-12 col-12 col-md-4 form-group"> | ||
<input type="text" | ||
placeholder="Datepicker" | ||
class="form-control" | ||
bsDatepicker | ||
[bsConfig]="{ showTodayButton: true, todayPosition: 'center' }"> | ||
</div> | ||
</div> |
7 changes: 7 additions & 0 deletions
7
demo/src/app/components/+datepicker/demos/today-button/today-button.ts
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 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-datepicker-today-button', | ||
templateUrl: './today-button.html' | ||
}) | ||
export class DemoDatepickerTodayButtonComponent {} |
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
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