Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8115

incorrect birthday saved to phonebook using Contacts Plugin

VotersStop watchingWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      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).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            daserge Sergey Shakhnazarov
            kiranjjain Kiran Jain
            Votes:
            2 Vote for this issue
            Watchers:
            8 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment