I am trying to implement a simple date range slider using ion-range-slider in angular
This is the html
<ion-range-slider #sliderElement
type="double"
[min]="myMinVar"
[max]="myMaxVar"></ion-range-slider>
Component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
myMinVar:Date;
myMaxVar:Date;
constructor() { }
ngOnInit() {
this.myMaxVar = new Date(2018,2,2);
this.myMinVar = new Date(2012,2,2);
}
}
When i try to change the range i am getting NAN
can any one let me know how can i fix the above issue Or is there any other third party date range slider i can use in angular?