details.date.toISOString is not a function
See original GitHub issueHello guys , i implemented the push notification in my project but i always get this problem
here’s my code :
`componentDidMount(){ codePush.sync({ updateDialog: true, installMode: codePush.InstallMode.IMMEDIATE })
let date = new Date(Date.now() + (6 * 1000));
PushNotification.localNotificationSchedule({
message: "My Notification Message", // (required)
date: (Platform.OS === 'ios') ? date.toISOString() : date // in 60 secs
})
}`
Note that i only get this problem on ios , android is working fine
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
[Solved] TypeError: toISOString is not a function - ItsJavaScript
The TypeError: toISOString is not a function occurs if we call a toISOString() method on the object that is not of type Date...
Read more >Date.now().toISOString() throwing error "not a function"
Date.now() returns a number which represents the number of milliseconds elapsed since the UNIX epoch. The toISOString method cannot be called on a...
Read more >Bug: value.toISOString is not a function #29 - GitHub
I am getting following error when quering for an object with an iso date field: serialize(value: Date) { return value.toISOString(); } ...
Read more >js toisostring is not a function Code Example - Code Grepper
1. Date.now() returns a number which represents the number of milliseconds elapsed since the UNIX epoch. The toISOString method cannot be called on...
Read more >toISOString() function not working. - jQuery Forum
I want to convert the date string into ISO date format which is compatible with firefox. However its not working in Jquery.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Don’t set date as
date.toISOString()
. Send thedate
object as is for both iOS and Android. So, doDo you guys have the latest version? This may be related to the
number
field not set in the details object which was fixed in this commit https://github.com/zo0r/react-native-push-notification/commit/6a4f70fa3754e511a7dfad4c86ae58db169e3c79#diff-168726dbe96b3ce427e7fedce31bb0bc