Open ashwanthrao opened 5 years ago
Hi @ashwanthrao! Which version of nebular do you use? Can't see this issue on latest ngx-admin.
i am using the latest 3.4.0. Find attachment for reference.
html code:
on button click (click)="onSubmit(FormEdit.value)"
<input nbInput placeholder="Form Picker" [nbDatepicker]="formpicker" name="date" value="" ngModel>
<nb-datepicker #formpicker></nb-datepicker>
component code: onSubmit(date):void{ alert(JSON.stringify(date)); }
Check previous comments,When we selected march 25th in calendar and alert display march 24th.
facing the same issue!
for anyone interested. I found out the issue is not caused by nebular, when data is selected it's in fact the correct value, but when value was passed to JSON.parse serialization of date become UTC-0 what's why it was behind one day.
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior: In Extra Component->calender I am trying to get date on Onsubmit which will provide the date from the HTML when selecting a data from datepicker. Issue is date is one date back. if i select Jan 31st in component i get jan 30("date1":"2019-01-30T18:30:00.000Z").
Expected behavior: it should show selected date.
Steps to reproduce:
Related code:
.html page below
<button type="button" (click)="onSubmit(Form.value)" style="float: right;" class="btn btn-secondary btn-demo btn-tn" >Save