Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend datetime field with an offset option... #264

Closed
rallek opened this issue Feb 10, 2013 · 5 comments
Closed

extend datetime field with an offset option... #264

rallek opened this issue Feb 10, 2013 · 5 comments

Comments

@rallek
Copy link

rallek commented Feb 10, 2013

... to have a default value which is a given no. of days in the future. This is very usefull for the enddate option.

@Guite
Copy link
Owner

Guite commented Feb 10, 2013

Original request:

I want to have a default value for datetime field wich is 90 day in the future.
I have set the enddate and future propperties to true.
I tried the value "now+90" but this gives an error during validation. Is there a way to calculate an offset of n days (or n seconds)?

@rallek
Copy link
Author

rallek commented Feb 10, 2013

Might be you can make a link to a variable like requested in #263

@rallek
Copy link
Author

rallek commented Aug 19, 2013

If the future property is set you can add automatically a variable for the offset a explained in #12

@ghost ghost assigned Guite Nov 6, 2013
@Guite Guite modified the milestones: Enhancements, Future Aug 27, 2014
@Guite Guite modified the milestones: 0.7.0, Future Jan 16, 2016
@Guite
Copy link
Owner

Guite commented Jan 16, 2016

This is now possible (for 1.4 targets) using the new validatorAddition option.
More details in #640.

@Guite Guite closed this as completed Jan 16, 2016
@Guite
Copy link
Owner

Guite commented Jan 16, 2016

For the example above you would use a value like GreaterThanOrEqual("+90 days").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants