Enable TYPO3 page content expiration date - typo3

I'm in TYPO3 v.6.2 and from this year the expiration date is no longer accepting dates beyond 2020-12-31.
That was some sort of prophecy? XD
I suppose it is just a matter of configuration.
Where can I change that to enable future expiration dates?

That's the gentle reminder to upgrade your TYPO3 installation ;)
Your problem is that in old TYPO3 versions the upper limit of the date selector is hard coded in the TYPO3 core.
This can be fixed with a little bit of PHP code, e.g. in the ext_localconf.php or Configuration/TCA/Overrides/YOUR_TABLE_NAME.php of your own extension:
$GLOBALS['TCA']['YOUR_TABLE_NAME']['columns']['YOUR_FIELD_NAME']['config']['range']['upper'] =
mktime(0,0,0,12, 31, 2030);
The code snippet must be adapted for every table and field that contains a date selector.

Related

Date related operations in jinja2

I am using cratejoy to create a 'subscription boxes' based website.It used jinja2 as its templating engine.
Now I am editing email templates where I want to access order items and send my customized messages.
My question is how to do date related operations using jinja2 syntax just as getting-
date on next monday,
next month name,
first monday of next month etc
I am able to do everything easiliy with javascript but it wont be helpful since email clients wont run JS.
Any help will be appreciated !!

Is there a way to check date dynamically in eloqua?

Context: I am using Microsoft Dynamics (CRM) and Eloqua to send email campaigns. I have a date field in CRM that I want to check against in Eloqua for a specific campaign. This campaign needs to check to see if the date field is <= today's date + 90 days. I am using the campaign UI in Eloqua, not doing anything programmatically at this point.
I have tried using the Compare Custom Object Fields decision in Eloqua by finding the date field, setting the comparator to dynamically on or before, and I want to make the compared value Today + 90 days. I'm not sure how to accomplish this in this type of Decision object because the only options I have to compare the date field to are Yesterday, Today, or Tomorrow. See image below:
I have also tried to use the Compare Date Decision object, but there is no dynamic comparison, just hard-coded date options.
The last thing I tried was a Wait step, but that only waits a hard-coded number of days rather than checking dynamically.
Has anyone run into this issue or know of a solution to this problem?
We were able to find an Eloqua Date App to download that adds a Date Decision step to the program builder which allowed us more flexibility with comparing dates in a custom range.

Drupal 7 and Page Manager: add Selection rules based on dates

I have a content type article with a field date.
I am trying to fire a variant from Page Manager by defining a selection rule based on a date field.
What I am trying to do is applying this variant when
the node type is article
field date, start date < now < field date, end date
I can define the first condition but I can't figure out how to make a condition based on a date. Is it possible or not? I couldn't find more information about this.
Thanks
I managed to do this finally by writing a PHP Code Selection Rule.
I got from the exposed $contexts variable the start and end values for date field and I wrote a simple condition to check if "now" is in between the two dates.
Beware that the dates are stored in UTC format in the field and your site/users might be in a different timezone.

How to protect Only Month and year of date in Powerbuilder

How to protect only Month and Year of a date in Powerbuilder so user can only edit day of the date?
As comments suggest, this reads more like a user requirement than a technical question (e.g. lack of mention of what type of control is involved), but if this were my requirement, I'd try one of these (user exercise to figure out which ones would actually work; it's not my requirement grin).
EditChanged: I'd put a date EditMask on a DataWindow (remember external DataWindows; it's a common misconception to think that controls on DataWindows have to be tied to a database column), and code the EditChanged to revert the year and month back to their set values if they've been changed. (I'd consider this pretty aggravating for the user, but it's possible)
Day field: Make the year and month StaticText, and make the day only an editable field. Edit, EditMask or EditMask with spin control would be appropriate for this (spin gives you control over the range with minimal scripting).
Custom control: Grab the source code for a dropdown calendar (PFC comes to mind), and customize it to disable the navigation between years and months.
Good luck,
Terry

GWT DatePicker to show specific day of the Week

How do I show only a particular day of the week in gwt-datePicker ?
E.g
If I select January or any month of the year, I want to see only "Tuesdays" for that month.
Cheers
Prince
Short answer: With the default component you cannot.
I would recommend you to create your own widget. Remember that GWT doesn't have support for the Calendar Object, so you'll need to do your own calculations.
I had a similar requirement once where the datepicker popup needed to show the week number in an additional column. Since you cannot subclass/override all the necessary behaviour of the standard classes, there was nothing for it in the end but to rip out the source code and create a new implementation with minor changes.
As for date calculations, there is a port of joda time which you can import client-side. Quite a bit of overkill if you only need the day of the week, though.
http://code.google.com/p/gwt-time/