-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
Showing
21 changed files
with
295 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,22 @@ | ||
<mat-toolbar>{{title}}</mat-toolbar> | ||
<nav class="light-blue lighten-1" role="navigation"> | ||
<div class="nav-wrapper container"> | ||
<a href="//github.com/fetrarij/ngx-daterangepicker-material" class="brand-logo"> | ||
<img src="assets/images/github.png" style="width: 30px"> | ||
</a> | ||
<ul class="right hide-on-med-and-down"> | ||
<li><a [routerLink]="['simple']">Simple</a></li> | ||
<li><a [routerLink]="['single-datepicker']">Single dateicker</a></li> | ||
<li><a [routerLink]="['full']">Full options</a></li> | ||
</ul> | ||
|
||
<mat-card> | ||
<div class="row"> | ||
<div class="col s6"> | ||
<input type="text" matInput | ||
ngxDaterangepickerMd | ||
[autoApply]="options.autoApply" | ||
[showInputs]="options.showInputs" | ||
[linkedCalendars]="options.linkedCalendars" | ||
[singleDatePicker]="options.singleDatePicker" | ||
applyLabel="Okay" | ||
[locale]="locale" | ||
startKey="start" | ||
endKey="end" | ||
[(ngModel)]="selected" | ||
(click)="click()" | ||
[minDate]="minDate" | ||
[maxDate]="maxDate" | ||
[showWeekNumbers]="options.showWeekNumbers" | ||
[showISOWeekNumbers]="options.showISOWeekNumbers" | ||
name="daterange"/> | ||
</div> | ||
<div class="col s6"> | ||
<strong>Value: </strong>{{selected | json}} | ||
<hr/> | ||
<h4>Options:</h4> | ||
<strong>autoApply:</strong> <mat-checkbox [(ngModel)]="options.autoApply">Value: {{options.autoApply}}</mat-checkbox><br/> | ||
<strong>showInputs:</strong> <mat-checkbox [(ngModel)]="options.showInputs">Value: {{options.showInputs}}</mat-checkbox><br/> | ||
<strong>linkedCalendars:</strong><mat-checkbox [(ngModel)]="options.linkedCalendars">Value: {{options.linkedCalendars}}</mat-checkbox><br/> | ||
<strong>singleDatePicker:</strong><mat-checkbox [(ngModel)]="options.singleDatePicker">Value: {{options.singleDatePicker}}</mat-checkbox><br/> | ||
<strong>showWeekNumbers:</strong><mat-checkbox [(ngModel)]="options.showWeekNumbers">Value: {{options.showWeekNumbers}}</mat-checkbox><br/> | ||
<strong>showISOWeekNumbers:</strong><mat-checkbox [(ngModel)]="options.showISOWeekNumbers">Value: {{options.showISOWeekNumbers}}</mat-checkbox><br/> | ||
<strong>minDate:</strong> {{minDate | date: 'dd/MM/yyyy'}}<br/> | ||
<strong>maxDate:</strong> {{maxDate | date: 'dd/MM/yyyy'}}<br/> | ||
<strong>locale</strong> : <br/> | ||
<div class=""> | ||
<div class="row"> | ||
<div class="col s12"> | ||
<mat-form-field> | ||
<mat-select placeholder="Choose format" [(ngModel)]="locale.format"> | ||
<mat-option value="DD/MM/YYYY">DD/MM/YYYY</mat-option> | ||
<mat-option value="MM-DD-YYYY">MM-DD-YYYY</mat-option> | ||
</mat-select> | ||
</mat-form-field><br/> | ||
locale value:<br/> | ||
{{locale | json}} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col s6"> | ||
</div> | ||
<div class="col s6"> | ||
</div> | ||
</div> | ||
</mat-card> | ||
|
||
|
||
<ul id="nav-mobile" class="side-nav" style="transform: translateX(-100%);"> | ||
<li><a href="//github.com/fetrarij/ngx-daterangepicker-material">Github</a></li> | ||
</ul> | ||
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a> | ||
</div> | ||
</nav> | ||
|
||
<div class="container"> | ||
<router-outlet></router-outlet> | ||
</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,3 @@ | ||
nav { | ||
margin-bottom: 50px; | ||
} |
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,24 @@ | ||
import { Routes } from '@angular/router'; | ||
import { SimpleComponent } from './simple/simple.component'; | ||
import { FullComponent } from './full/full.component'; | ||
import { SingleDatepickerComponent } from './single-datepicker/single-datepicker.component'; | ||
|
||
export const AppRoutes: Routes = [ | ||
{ | ||
path: '', | ||
redirectTo: 'simple', | ||
pathMatch: 'full' | ||
}, | ||
{ | ||
path: 'simple', | ||
component: SimpleComponent, | ||
}, | ||
{ | ||
path: 'single-datepicker', | ||
component: SingleDatepickerComponent, | ||
}, | ||
{ | ||
path: 'full', | ||
component: FullComponent, | ||
} | ||
]; |
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,60 @@ | ||
<mat-toolbar>{{title}}</mat-toolbar> | ||
|
||
<mat-card> | ||
<div class="row"> | ||
<div class="col s6"> | ||
<input type="text" matInput | ||
ngxDaterangepickerMd | ||
[autoApply]="options.autoApply" | ||
[showInputs]="options.showInputs" | ||
[linkedCalendars]="options.linkedCalendars" | ||
[singleDatePicker]="options.singleDatePicker" | ||
applyLabel="Okay" | ||
[locale]="locale" | ||
startKey="start" | ||
endKey="end" | ||
[(ngModel)]="selected" | ||
(click)="click()" | ||
[minDate]="minDate" | ||
[maxDate]="maxDate" | ||
[showWeekNumbers]="options.showWeekNumbers" | ||
[showISOWeekNumbers]="options.showISOWeekNumbers" | ||
name="daterange"/> | ||
</div> | ||
<div class="col s6"> | ||
<strong>Value: </strong>{{selected | json}} | ||
<hr/> | ||
<h4>Options:</h4> | ||
<strong>autoApply:</strong> <mat-checkbox [(ngModel)]="options.autoApply">Value: {{options.autoApply}}</mat-checkbox><br/> | ||
<strong>showInputs:</strong> <mat-checkbox [(ngModel)]="options.showInputs">Value: {{options.showInputs}}</mat-checkbox><br/> | ||
<strong>linkedCalendars:</strong><mat-checkbox [(ngModel)]="options.linkedCalendars">Value: {{options.linkedCalendars}}</mat-checkbox><br/> | ||
<strong>singleDatePicker:</strong><mat-checkbox [(ngModel)]="options.singleDatePicker">Value: {{options.singleDatePicker}}</mat-checkbox><br/> | ||
<strong>showWeekNumbers:</strong><mat-checkbox [(ngModel)]="options.showWeekNumbers">Value: {{options.showWeekNumbers}}</mat-checkbox><br/> | ||
<strong>showISOWeekNumbers:</strong><mat-checkbox [(ngModel)]="options.showISOWeekNumbers">Value: {{options.showISOWeekNumbers}}</mat-checkbox><br/> | ||
<strong>minDate:</strong> {{minDate | date: 'dd/MM/yyyy'}}<br/> | ||
<strong>maxDate:</strong> {{maxDate | date: 'dd/MM/yyyy'}}<br/> | ||
<strong>locale</strong> : <br/> | ||
<div class=""> | ||
<div class="row"> | ||
<div class="col s12"> | ||
<mat-form-field> | ||
<mat-select placeholder="Choose format" [(ngModel)]="locale.format"> | ||
<mat-option value="DD/MM/YYYY">DD/MM/YYYY</mat-option> | ||
<mat-option value="MM-DD-YYYY">MM-DD-YYYY</mat-option> | ||
</mat-select> | ||
</mat-form-field><br/> | ||
locale value:<br/> | ||
{{locale | json}} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col s6"> | ||
</div> | ||
<div class="col s6"> | ||
</div> | ||
</div> | ||
</mat-card> | ||
<simple></simple> |
Empty file.
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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FullComponent } from './full.component'; | ||
|
||
describe('FullComponent', () => { | ||
let component: FullComponent; | ||
let fixture: ComponentFixture<FullComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ FullComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(FullComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,37 @@ | ||
import { Component, OnInit, ViewChild } from '@angular/core'; | ||
import * as moment from 'moment'; | ||
import { DaterangepickerDirective } from '../../../../src/daterangepicker/daterangepicker.directive'; | ||
|
||
@Component({ | ||
selector: 'full', | ||
templateUrl: './full.component.html', | ||
styleUrls: ['./full.component.scss'] | ||
}) | ||
export class FullComponent implements OnInit { | ||
|
||
title = 'Pure angular daterangepicker'; | ||
options: any = { | ||
autoApply: false, | ||
showInputs: false, | ||
alwaysShowCalendars: false, | ||
linkedCalendars: true, | ||
singleDatePicker: false, | ||
showWeekNumbers: false, | ||
showISOWeekNumbers: false | ||
}; | ||
minDate: moment.Moment = moment().subtract(5, 'days'); | ||
maxDate: moment.Moment = moment().add(2, 'month'); | ||
locale: any = { | ||
format: 'DD MMMM YYYY', | ||
separator: ' To ', | ||
cancelLabel: 'Cancel', | ||
applyLabel: 'Okay' | ||
} | ||
click() { | ||
} | ||
selected = {start: moment().subtract(3, 'days'), end: moment().add(3, 'days') }; | ||
@ViewChild(DaterangepickerDirective) daterangepicker: DaterangepickerDirective; | ||
constructor() { } | ||
ngOnInit() { | ||
} | ||
} |
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,6 @@ | ||
<mat-toolbar>Simple daterangepicker</mat-toolbar> | ||
<div class="row"> | ||
<div class="col s6"> | ||
<input type="text" ngxDaterangepickerMd [(ngModel)]="selected" class="form-control" placeholder="Choose date"/> | ||
</div> | ||
</div> |
Empty file.
Oops, something went wrong.