This tag can be used for questions about the Date module, or dates.

learn more… | top users | synonyms

0
votes
0answers
17 views

Find “next day date” (00:01am) from a given date & time value in Rules

I'm trying to figure out how to find the next day date (xx/xx/xx 00:01am) from the given date&time value in rules without the use of PHP filter module. Played with offset already - couldn't get ...
0
votes
0answers
28 views

Add date picker to custom form

I had installed date and Date Popup modules in my website and using it in views and exposed filter forms. Now i need to create one custom form in node template to fetch results from database. i don't ...
0
votes
0answers
21 views

End Date always after Start Date?

Related to, but not the same as Change end date automatically after changing start date I'm looking for a method to have Date fields do some sort of validation on the end date. I don't want it to get ...
0
votes
0answers
10 views

Editing and saving content, forces admin page redirect

The issue is when I try to save an edited piece of content in the overlay (an event), the system will redirect to the admin edit page. Then when I try to save from the admin edit page, the page goes ...
0
votes
1answer
27 views

TimePicker Rendered by an Ajax Callback Function Doesnt Show Up

I have a select form element that fires an ajax callback function everytime its value changes. $form['template_options'] = array( '#type' => 'select', '#options' => array( 1 ...
0
votes
0answers
17 views

Date - inline start and end date

On node creation date field is huge when there is end date (required), so i would like to have it inline like on this image:
0
votes
1answer
7 views

How to add custom month in Date field?

In my academic website, I need to add graduation year as a date field but for month field, I want to add only two month (May and December). Can I do this? My professor want like this and i don't ...
0
votes
1answer
23 views

Display date picker not inline in Drupal 7 Forms API

I have installed Date Picker Module and it works fine. Below is the code: $form['date'] = array( '#title' => t('Select your birthdate'), '#type' => 'datepicker', '#date_format' ...
-1
votes
1answer
18 views

Date selection with price - without commerce

I need a option to let users set up dates and price when creating node with unlimited number of entries. For example: "from: 15/01/2015 to 20/02/2015 - Price = 50 USD" from: 21/02/2015 to ...
0
votes
3answers
33 views

How to display 01, 02… instead of Jan, Feb… on Select List with Date

I use Drupal7. I have a profile2's field, named "Birthday". I set the FIELD TYPE as Date. And, I set Custom input format as "Y-m-d" under "More settings and values" on field edit page. This is ...
0
votes
1answer
81 views

When collect an end date instead of a new field?

I need make a content type with a Start Date and a End Date, I know that I can handle this in two ways: Have two separate field Have one field with a option of "collect an end date". I need to ...
0
votes
0answers
13 views

Programmatically set a multi value date field

$checked = array(); foreach($form['field_rundays'][LANGUAGE_NONE]['#default_value'] as $key => $val) { $checked[$key] = $val; } r($i=0;$i<count($checked);$i++){ $date = ...
0
votes
0answers
8 views

Referencing a field from Event in Computed Fields

Background: I am creating a task list for hosting events. The list is the same for each event only the date of the event will change. The due date of each task is based on the event date minus the ...
3
votes
1answer
91 views

Making a Chart based on node views count per day (last week)

I want to show my users a chart that lists the node views hit for that day (Content statistics: Views today), something like this: So the user can see how many views each node of his had in each ...
0
votes
3answers
25 views

Showing Created time in node teaser

I'm using omega for theming and I want to show created date time in teaser Article . I found this <?php print format_date($node->changed, 'article') ?> But i don't know where to put it ! ...
0
votes
1answer
41 views

Display different time from one field value

I have field to display event start date and time. This field uses date module's widget. I need display time of event start for different time zones. For example: Eventname - starttime for Tallin: ...
1
vote
1answer
20 views

How can I exclude content older than… with Views

I'm trying to get my head around a Views setting, I can't find how to exclude older than two years old content from Views. I know it has to be somewhere in the Filter section. I would expect this to ...
0
votes
3answers
17 views

Compute 3 New Date Fields

What is the best way to output 3 new dates relative to the first date? For instance, I have a date field called "medication_start" = 1/1/2010. I would like three new dates generated in 3 new fields in ...
0
votes
0answers
9 views

How to make a N days due to the end date field exposed filter in a view?

I need to expose a textbox to users, they can input a number, than the view filters out the nodes whose end date will be due after the input N days. I tried with date views module, no luck.
1
vote
1answer
20 views

How to save multi date and time in node programmatically?

I want to save multi Date value in a node programmatically. $node->field_event_date['und'][0]['value'] =?; $node->field_event_date['und'][0]['value2'] =?; getting the below value after print ...
1
vote
1answer
21 views

Date field displayed with wrong timezone with PHP's date_create + date_format

I have an Event content type with a Date field with a start and end date. When this field is being displayed in a view, it displays properly, with the time matching the value that was entered. ...
0
votes
1answer
26 views

I need to print the timestamp of date in drupal views fields?

I am using Views Data Export module to show feeds as xml. I need to show the created date and updated date in timestamp . How can I implement it?
0
votes
0answers
15 views

Drupal 7 Form API Date input as multiple text fields

Using the form API how can I create a date input with multiple text fields like this? The Date module offers a few input types but they are limited to a single text box (rather than three), select ...
0
votes
1answer
23 views

How do I sort a date field in views without the time?

Drupal 7 I have a view that sorts on three fields so the ORDER BY statement looks like: ORDER BY node_status ASC, field_data_field_date_field_date_value DESC, ...
0
votes
0answers
21 views

Date format - @ symbol has unexpected behaviour

I created a date format , then added that date format to a field within a view. But the @ symbol is automatically appending to the end of the date format (even though i specified it to go into the ...
0
votes
1answer
16 views

The 'to' date field not updating

Out of the box the date field can accept a 'from' and 'to' date parameters and the 'to' date field will auto update when the 'from' field changes. As work has progressed on my site the field no longer ...
2
votes
1answer
21 views

Add new date type?

How can I add a new date type? Under "Date type" I have "Long", "Medium" and "Short". How can I add a new option to this list?
1
vote
2answers
27 views

prevent user from putting 0000 in date field

How can I force date validation upon input of a content type so that a user cannot type in 0000 as the year which causes an error in Drupal 7.
0
votes
0answers
13 views

Change field settings after there is data in it

I am having an issue updating my event content type, I would like to turn on repeat date but, as there is a lot of data in it, so it doesn't allow me to do that and the option is GRAYED out. How can I ...
0
votes
0answers
35 views

add function on date selected through date popup field

I am using Date popup module for selecting a date in a registration form. Is it possible to fire an event on date select?
1
vote
0answers
13 views

Creating a semi-static default date field (fixed month and day, year=NOW)

I have a date field that needs an unusual default date: fixed day and month, but year=thisyear. That's outside the standard default date options. I didn't want to write a custom module for one ...
2
votes
2answers
70 views

Can't get “time ago” date format to work

From this blog post http://drupalmotion.com/article/time-ago-date-format-drupal Function: /** * Format date implementing hook_preprocess_node(). */ function YOURTHEME_preprocess_node(&$vars) { ...
0
votes
1answer
15 views

Drupal 6 CCK date field is saving current time when the time field is left blank

I have a node type='event' that has a "text field with date popup calendar". The date format is "05/13/2015 - 7:02pm". On the edit page, the form renders as two fields: a calendar popup text field ...
0
votes
1answer
21 views

Date Range, like google analytics

while I wanted to create a chart system for my website, for the apparel trend forecasting company, I wanted to add trends of sales based on today, yesterday, this week, this month, and year trend. I ...
1
vote
2answers
48 views

Call $created variable in content type node template

How can I call the $created variable in my content type node template? I tried the following but it just produces what seems to be a random string of numbers: <?php print render($created); ...
0
votes
2answers
24 views

Change content color based on Date Range

I am building a website using Drupal 7, Views, Rules, Ctools, Panels, etc. I need to change the content color based on the date. The idea is that each quarter's reports have a different color to make ...
0
votes
1answer
48 views

Calendar as view's pager (passing arguments between views?)

I have a view paged by week. Users are a bit disappointed by the pager: they find clumsy to navigate to weeks that are far in time (more than 1 month from today's date). The idea is to keep the ...
1
vote
0answers
27 views

How to set due date based on number of dates out from event

I am building a website for planning events. Each event is in its own space to separate groups. These events are planned almost identically. For example Invitations need to be sent out 42 days before ...
0
votes
2answers
56 views

How to get date values from field collection to a node?

I am trying to print the values from a field collection using following code in Drupal 7 node.But the date values are not getting. $wrapper = entity_metadata_wrapper('node', $node); $formtype = ...
0
votes
1answer
87 views

Date field with granularity of Month, Year in Exposed filter, how to alter the default value?

I have a Date field with granularity of Month, Year in Exposed filter. Everything is working fine, but the month and year default values are shown as "-Month" and "-Year". Let me know how to alter ...
1
vote
0answers
16 views

view dataexport xml file

I am trying to export a date field as mm/dd/yyyy. I keep getting the time 0:00:00 added on the end. Can someone tell me how to format the output from within the view. Formatter: choices are Date and ...
1
vote
0answers
25 views

Add the autocomplete functionality in date field [closed]

I want to add autocomplete functionality in date field. I tried using form alter but it doesn't catch & by using hook_date_text_process_alter, it works in date field but not for first time. It ...
2
votes
0answers
57 views

Change views Contextual Filter based on select list value

Using Event Calendar Module I displayed dates in a calendar views. Now I have to create a select list with options like IST CST EST PST Changing the values should change the Date displayed ...
0
votes
2answers
33 views

format_date() not working

I've got a field in a content type called "field_program_date" of type "Date". I'm using Drupal's format_date() function to format the date in the content template like this: $program_date = ...
0
votes
0answers
37 views

Datepicker disappeared from Drupal Rooms module

I have been struggling with this for a couple of days now. I installed Drupal Rooms module (D7), everything worked just fine, but after fiddling around on the site, the datepicker functionality ...
0
votes
0answers
50 views

jQuery datepicker position?

I can't seem to figure out why the jquery.ui datepicker position is off for my date fields. I've attached an image for reference. I understand the position is set dynamically but I don't know how to ...
0
votes
2answers
64 views

Change the title of date_popup filed in custom form

I'm building a custom form in Drupal 7 and i need to use the date_popup widget in it. It all works as expected, except the title of the field. My code is: $form['filter']['start_date'] = array( ...
0
votes
1answer
15 views

Returning all items in Views for Dates with Start dates AFTER Now as well as no date set

I have some items that have dates and some that do not. For items that have dates I do NOT want to show items that are past due (ie. events that are before today's date (or 'now' is fine). However I ...
0
votes
1answer
51 views

How to get the name of the month in local language in Drupal?

I want to display in a tpl.php file: 30 maart 2015, 11: 34 Currently i'm using below code <?php print date("j-F-Y H:i") ?> 1) How to get the name of the month in dutch instead of ...
0
votes
1answer
19 views

Setting a date to be empty by default

I have an event dates field that allows the user entering content to put in a start and and end date. By default it just shows them the start date. If they check a box it shows an end date and they ...