cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Bau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8115) incorrect birthday saved to phonebook using Contacts Plugin
Date Tue, 15 Mar 2016 07:50:34 GMT

    [ https://issues.apache.org/jira/browse/CB-8115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15194869#comment-15194869
] 

Colin Bau commented on CB-8115:
-------------------------------

hi [~vladimir.kotikov]
thanks your reply
but still not work in Android and iOS

in previous "cordova-plugin-contacts" version (I forgot which version)
in iOS,when I use => contact.birthday = new Date("16 May 1984");
the date saved is 15-May-1984 (1 day less than expected),in addition to that,all work
perfect

but for now when I use the "cordova-plugin-contacts" version (2.0.1)
in iOS,when I use => contact.birthday = new Date("16 May 1984");
the date saved become a long integer format(XXXXYYYYCCXXX)

and...
I try to use the new way that you tell me => contact.birthday = new Date(1985, 0, 23);
but it will become that "475257600000"
http://www.littlebau.com/2016-03-15_154813.jpg

> incorrect birthday saved to phonebook using Contacts Plugin
> -----------------------------------------------------------
>
>                 Key: CB-8115
>                 URL: https://issues.apache.org/jira/browse/CB-8115
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: 4.0.0
>         Environment: Android and IOS
>            Reporter: Kiran Jain
>            Assignee: Vladimir Kotikov
>            Priority: Minor
>              Labels: Android, IOS, birthday, reproduced, triaged
>
> We are facing an issue while trying to add birthday to Contact while using Cordova for
android while adding a new contact to the phonebook
> following is part of the code
> contact = navigator.contacts.create({
> "displayName": displayname
> });
> // store contact name
> var contactName = new ContactName();
> contactName.familyName = lastname;
> contactName.givenName = firstname
> contact.name = contactName;
> contact.birthday = new Date("16 May 1984");
> // save the contact
> contact.save();
> With above code, when data is viewed in android phone, the birthday is save as 29-12-6731
instead of expected 16-May-1984
> we have tried all possible combinations of date entry viz: 16-May-1984 ; 16/May/1984
; 16/5/1984 ; new date(1984,05,16)
> but all in vain the results are the same.
> also need to know how to save anniversary date
> when using this plugin for IOS, the date saved is 15-May-1984 (1 day less than expected).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message