Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs Angular 2模型属性未从剑道UI日期选择器拾取更新的日期值_Angularjs_Typescript_Kendo Datepicker - Fatal编程技术网

Angularjs Angular 2模型属性未从剑道UI日期选择器拾取更新的日期值

Angularjs Angular 2模型属性未从剑道UI日期选择器拾取更新的日期值,angularjs,typescript,kendo-datepicker,Angularjs,Typescript,Kendo Datepicker,我正在编写一个angular应用程序,其中我希望根据剑道日期选择器的更新值调用API。剑道日期选择器绑定到角度模型,但是,更改日期后,我在模型变量中得到相同的旧值(最初指定的值)。下面是我正在使用的Typescript和HTML代码。我遗漏了什么吗 HTML: <input id="datepicker" kendo-datepicker k-ng-model="StartDate" value="{{StartDate}}" /> <button type="butto

我正在编写一个angular应用程序,其中我希望根据剑道日期选择器的更新值调用API。剑道日期选择器绑定到角度模型,但是,更改日期后,我在模型变量中得到相同的旧值(最初指定的值)。下面是我正在使用的Typescript和HTML代码。我遗漏了什么吗

HTML:

 <input id="datepicker"  kendo-datepicker k-ng-model="StartDate" value="{{StartDate}}" />
 <button type="button" class="btn btn-primary" (click)="save();">Save</button>
export class AdminPeriodConfigurationComponent {
    StartDate: any;
    constructor(private _router: Router, private _globalService: GlobalService){
    }

    loadData(){
       this.StartDate="09/28/2016";// format is "mm-dd-yyyy" and this value binds to datepicker
    }

    ngOnInit() {
       this.loadData();
    }

    save(){
       var myobj=new MyClass();
       myobj.NewSelectedDate=this.StartDate; // here the updated value does not get assigned.
    }
}