question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't set value with datetime

See original GitHub issue

When i set the value into my form, the minutes and seconds are not displayed… Any reason ?

View: image

Code; image

Code inline

const startDate = new Date(delegation.StartDate);
const endDate = new Date(delegation.EndDate);
console.log(startDate, endDate);
this.delegationForm.get('startDate').setValue(startDate);
this.delegationForm.get('endDate').setValue(endDate);
this.delegationForm.get('sendEmail').setValue(delegation.SendEmail);
this.delegationForm.get('sendEmailToSignatory').setValue(delegation.SendEmailToSignatory);

Console: image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bastienlemaitrecommented, Jan 10, 2018

Found why… https://stackblitz.com/edit/angular-material-datetimepicker-issue

The matInput must be declared after mat-datetime-picker

0reactions
camposfyicommented, Sep 2, 2018

@bastienlemaitre’s solution worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DateTime? Cannot assign a value - Stack Overflow
I have created a Nuallable DateTime property (DateTime?) however when i try to assign a value from my database entity(when debugged has a ......
Read more >
Date Time field value is not setting correctly. - ServiceNow
Solved: Hello friends, I am facing an issue with the setting of the data time field value i.e. First Discovered and Last Discovered...
Read more >
Input_datetime not able to set values - Configuration
I have created a sensor for storing the last boot date and time: input_datetime.boot_time. But I am unable to load the time and...
Read more >
Can't set datetime field time value in API - ProcessWire
Hi everyone, I am trying to add a datetime field to a process module and am having a weird problem here.
Read more >
Convert Text and Numbers to Date and Date & Time
Other data sets might use text and numeric values that represent dates in ways ... may see a message saying "Looker Studio can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found