Poll David
Posts: 0
Joined: Sat Jan 24, 2015 5:22 am

Sort Entries by using Date and Time on database (NOT THE DATE AND TIME IT WAS CREATED)

I creating an Itinerary App and so far so good, I have all these working:

Login, Create, Update, Delete and List of Itinerary

and an Itinerary contains:

Event Name
Details
Location
Start Date / Time
End Date / Time

What I want to do is List or Sort all the Itinerary base on date/time (not the time it was created)

I followed this one on listing the itineraries

http://devcenter.appery.io/tutorials/...

How can i sort the entries base on Date and Time inputted by the user?

Any thoughts?

Thanks

Poll David
Posts: 0
Joined: Sat Jan 24, 2015 5:22 am

Sort Entries by using Date and Time on database (NOT THE DATE AND TIME IT WAS CREATED)

Hi thanks for the response. I found out the answer before you replied but I appreciate it.

Can I have a follow-up question?

So now that the List is sorted by date input of the user, Is it possible to put a strikethrough on the entry when it is already done? maybe when "END DATE and TIME" already passed.

Ex.

Outing
Start - 1/24/2015 (12am)
End - 1/26/2015 (12am)

Since its already done, I want to put a STRIKETHROUGH on OUTING when it is listed on the LIST. Is this possible?

Image

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Sort Entries by using Date and Time on database (NOT THE DATE AND TIME IT WAS CREATED)

You can use the following to strikethrough a particular list item

Apperyio('mobilelistitem_5').css('text-decoration', 'line-through');

Just remember to change "mobilelistitem_5" with your List Item Name

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Sort Entries by using Date and Time on database (NOT THE DATE AND TIME IT WAS CREATED)

You can evaluate the date and then you can use the code in the Success Event mapping (JS)

Poll David
Posts: 0
Joined: Sat Jan 24, 2015 5:22 am

Sort Entries by using Date and Time on database (NOT THE DATE AND TIME IT WAS CREATED)

Hi M&M,

the problem with this code is that it only strikes the first listitem

codeApperyio('mobilelistitem_5').css('text-decoration', 'line-through'); /code

How can I define the date of a certain item on the list?

Return to “Issues”