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.

DateTime doesn't update value of variable

See original GitHub issue

Bug Report

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.0.0-rc.10 (/usr/local/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-alpha.7
   @angular-devkit/core       : 0.6.0
   @angular-devkit/schematics : 0.6.0
   @angular/cli               : 6.0.1
   @ionic/ng-toolkit          : not installed
   @ionic/schematics-angular  : 1.0.0-rc.10

Cordova:

   cordova (Cordova CLI) : not installed
   Cordova Platforms     : none

System:

   NodeJS : v10.4.1 (/usr/local/bin/node)
   npm    : 6.1.0
   OS     : macOS High Sierra
   Xcode  : Xcode 9.4.1 Build version 9F2000

Environment:

   ANDROID_HOME : not set

Describe the Bug The DateTime element doesn’t update the variable that it is connected with through two way binding. The variable just stays unchanged either undefined or with the pre-set value.

It seems as if one-way binding is used here although two-way binding is specified.

Steps to Reproduce Steps to reproduce the behavior:

  1. Checkout the Ionic conference app at the core-updatebranch
  2. Click on About and change May 17, 2045 to something else
  3. See that the underlying variable conferenceDate didn’t change

Expected Behavior The specified variable should be changed accordingly to the selected value in the view.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hcassar93commented, Aug 10, 2018

DateTime now binds with ngModel for me.

But instead of getting an ISODateString from the binding I’m getting an object with seperate properties for day, month, year, etc depending on what display-format I choose. I don’t know what to do with?

Also if you select that first value from a column (such as 01 day of the month) the value for that property is returned as null (eg day property is null in the object).

Not sure if I’m doing something wrong, but somethings up.

0reactions
ionitron-bot[bot]commented, Sep 9, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

flutter - DateTime.now() doesn't update correctly - Stack Overflow
You store the timestamp in the final variable, and never update it. That's why you get the same value in the database.
Read more >
Datetime User Variable Not Updating When SSIS Job Runs
I have an SSIS package with a datetime user variable that is scheduled as a daily job. It runs fine, however, the datetime...
Read more >
DateTime field issue, updated value is not displaying
I have two fields dropdown and datetime. Date and Time field value will be updating when drop down value is changing and user...
Read more >
Assign DateTime value directly to Date Time variable - StudioX
Hi, Can any one tell me , Can we assign DateTime Value to Date Time Variable. Like sampleDateTime = “12/02/2020” in assign activity ......
Read more >
Set variable import options - MATLAB setvaropts - MathWorks
opts = setvaropts( opts , Name,Value ) updates all the variables in the opts ... of the variables to replace missing values with...
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