In a filter I can specify 'now' to symbolize today.

Can I do the same with a views argument?

Chris

Comments

arlinsandbulte’s picture

Yes, you can set the default argument to "Current Date"
Add an argument
Select "Date: Date (node)" or "Date: Date (users)" as your argument type
Under "Action to take if argument is not present:" Select "Provide default argument"
Under "Provide default argument options" Select "Current Date"
Choose the date field for your argument.

This will make the view argument default to "Current Date" when no argument is supplied.

socialnicheguru’s picture

my view has the following url

myview/%term/listing/%date/%uid

so if I want to pass in todays date, how do I do that

myview/all/listing//1

or

myview/all/listing/now/1

arlinsandbulte’s picture

Status: Active » Fixed

It has been 3+ months with no activity.
Re-Open if you still need support regarding this.

socialnicheguru’s picture

Status: Fixed » Active

Still need it. If I need to pass in the current date, how do I do that? In this case, I can't use the default argument.
Thanks.

karens’s picture

Status: Active » Postponed (maintainer needs more info)

That's what the default argument IS, you're saying you want the default to be the system date. There's no way to do this except a default argument, why can't you use one?

arlinsandbulte’s picture

Status: Postponed (maintainer needs more info) » Fixed

2 months with no activity after being set to 'postponed (maintainer needs more info)'

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.