Page 1 of 1

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

Posted: Sun Jan 25, 2015 12:36 pm
by Poll David

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


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

Posted: Sun Jan 25, 2015 5:42 pm
by Alena Prykhodko

Hello,

You can create query for this need, please read more here http://devcenter.appery.io/documentat...


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

Posted: Tue Jan 27, 2015 11:49 am
by Poll David

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


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

Posted: Tue Jan 27, 2015 2:13 pm
by M&M

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


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

Posted: Tue Jan 27, 2015 2:15 pm
by M&M

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


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

Posted: Mon Feb 02, 2015 12:32 pm
by Poll David

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?