Closed (duplicate)
Project:
Date
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2008 at 03:28 UTC
Updated:
19 Aug 2010 at 03:16 UTC
Can we have a default option "absolute" in addition to 'blank', 'now', or 'relative'?
For examply, I would like to set the default value for a date field to, say 25 December 2008. I don't see how that is possible with the current options?
Comments
Comment #1
karens commentedMoving D5 feature requests that aren't going to get into the initial official 5.2 release to be D6 feature requests that could potentially be backported to D5.2.
Comment #2
miiimooosubscribing
Comment #3
attiks commentedAnyone already working on this?
Comment #4
julou commentedsubscribing +10
btw, the use of relative with a constant sfrtotime value would already be a turn around.
but it unfortunately does not work.
Comment #5
daninfpj commentedsubscribing.
"Common sense" and yes, it should at least work with strtotime (something like '1 January 1990'), but it doesn't.
Comment #6
mandclu commentedSubscribing. Has anyone figured out why a valid date string doesn't work?
Comment #7
Melissamcewen commentedSubscribing and +1. On the site I'm building now, which is a conference site with specific dates, this would be very useful...
Comment #8
arlinsandbulte commentedDuplicate of #319195: Set default value to a custom strtotime string (for relative or exact dates)
Comment #9
mandclu commentedI don't consider this issue a duplicate at all. That thread talks about a more advanced way to specify the relative value, which is not what is being discussed here. Allow me to cite a specific example.
I'm currently working on a site for a fair which runs for 10 days. I would like the date value to default to the start time of the fair, so that if you are adding a new event you always begin within the fair's run, regardless of when the event is being entered (could be anywhere from 6 months to two weeks before the start of the fair).
The third choice being discussed in that thread is still relative to the time of entry, not the fixed date date option being requested here.
Comment #10
arlinsandbulte commented@surge_martin:
Yes, I see your point, and it is a valid one.
But, rather than duplicate, I think these two issues should be merged, providing a simpler, more elegant, & more robust solution for both issues (killing two birds with one stone).
Both issues could be solved if we changed the choices to only two:
'blank' or 'enter a date string'
That 'date string' could be any valid strtotime string like:
now
now + 1 week
Last Thursday
July 10, 2010 <- this is an exact date just like what you want.
So, that is my reasoning and why I think this should be considered as a duplicate of that issue.
What do you think?
Comment #11
mandclu commentedIf you would update the title of the other issue to acknowledge that accepting a specific date (as part of support for an arbitrary date string) is one of the goals of the feature request, then I will absolutely agree that the two issues can be merged.
Just want to make sure we don't lose track of the actual intent here.
Comment #12
arlinsandbulte commentedDeal :-) #319195: Set default value to a custom strtotime string (for relative or exact dates)
Thanks for the input.
Comment #13
arlinsandbulte commented