I have a JSON file with 365 messages, a message for each day of the year.
-How do I load on the homepage Yesterday’s, Today’s, and Tomorrow’s message title based on device date? User will then click on title and go to that message page.
-How to use a date picker to pick a particular date of the message?
JSON file is something like this:
{
"messages": [
{
"id": "1",
"date": xxxxxxxx,
"message": " sample message1.",
"thumb": "assets/img/message1.jpg",
"title": "sample title1"
},
{
"id": "2",
"date": xxxxxxx,
"message": " sample message2.",
"thumb": "assets/img/message2.jpg",
"title": "sample title2"
},
Thanks in advance…