Due Date - Javascript

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 10:43 PM
Hi!
I am trying to filter and list all records that will be due in 7 days.
Is this correct?
var now = new Date();
var filter = {filter
ueByDate:[MIN TO \"" + (now.getDate()+7) + "\"]};
Thank you.
David
I am trying to filter and list all records that will be due in 7 days.
Is this correct?
var now = new Date();
var filter = {filter

Thank you.
David
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2013 10:04 AM
I believe that the dates must be ISO8601 with the - quoted.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2013 09:02 PM
It depends on what record you want to filter and where.
By Due Date I guess you mean to use a filter on tasks page or on workflow instance.If so you can use dueBefore and dueAfter paramter in webscript api url.I you want to search the model directly use dueDate property in iso08601 format.
By Due Date I guess you mean to use a filter on tasks page or on workflow instance.If so you can use dueBefore and dueAfter paramter in webscript api url.I you want to search the model directly use dueDate property in iso08601 format.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2013 02:45 AM
Hi!
Thank you for your replies.
I did the following and it almost works
var filters = [label:"Due next 7 days ",filter:"@dueDate:[MIN TO \"" + now.getFullYear() + "-" + (now.getMonth()+1) + "-" + (now.getDate()+7) + "\"]"}];
It will list all of due records that will due within next 7 days, but it will also list all records that dates are less than today's date.
I only need to list records that are GTE (than today) and LTE (7 days from today).
I was not able to find any method in JavaScript called dueAfter (which sounds prefect for my need), that will list all due date from today and show records for next 7 days.
Appreciate your guidance.
Thank you.
David
Thank you for your replies.
I did the following and it almost works
var filters = [label:"Due next 7 days ",filter:"@dueDate:[MIN TO \"" + now.getFullYear() + "-" + (now.getMonth()+1) + "-" + (now.getDate()+7) + "\"]"}];
It will list all of due records that will due within next 7 days, but it will also list all records that dates are less than today's date.
I only need to list records that are GTE (than today) and LTE (7 days from today).
I was not able to find any method in JavaScript called dueAfter (which sounds prefect for my need), that will list all due date from today and show records for next 7 days.
Appreciate your guidance.
Thank you.
David
