You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/12/05 03:19:33 UTC
[royale-asjs] branch develop updated: date compare in JS only
checks to see if same instance, not the value
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 67b6157 date compare in JS only checks to see if same instance, not the value
67b6157 is described below
commit 67b615781d53b4f36724aa93c1d29c4583a78494
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Dec 4 19:19:20 2019 -0800
date compare in JS only checks to see if same instance, not the value
---
.../royale/org/apache/royale/html/beads/models/DateChooserModel.as | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/DateChooserModel.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/DateChooserModel.as
index 109c2a8..e202b1f 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/DateChooserModel.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/DateChooserModel.as
@@ -192,6 +192,12 @@ package org.apache.royale.html.beads.models
}
public function set selectedDate(value:Date):void
{
+ COMPILE::JS
+ {
+ // in JS, date compare does not compare values, only if same instance
+ if (value != null && _selectedDate != null && value.getTime() == _selectedDate.getTime())
+ return;
+ }
if (value != _selectedDate) {
_selectedDate = value;