Use this tag for any question about handling date with Drupal or the Date module.

learn more… | top users | synonyms

0
votes
0answers
11 views

How do I add repeating dates programmatically?

I have some JSON data I'm using to populate Drupal 7 database. This involves creating nodes with repeating dates. This is a sample of the data. [field_event_date] => Array ( [0] ...
0
votes
0answers
10 views

How to change date repeat display format

I am using date module & date repeat API but now i want to change repeat date format.Now repeat date is display in "Repeats 5 days " but i want to show only "5 days " instead of "Repeats 5 days"
1
vote
1answer
14 views

Setting date_popup year range to more than the 3 years default in Drupal 7

I have a custom module and using date_popup. Currently the popup only shows a 3 year range in the date popup. $form['startdate'] = array( '#type' => 'date_popup', '#title' ...
2
votes
1answer
24 views

Date format help

I am trying to add Japanese date Y年 n月 j日 in fields but the date is being displayed 2016年 2月 6日 年月日 . I want to remove 年月日 at the end of the date it indicates year month and day. 2016年 2月 6日 is exact ...
0
votes
0answers
8 views

Ajax form hidden default value not returning values when ajax runs

I have a custom where I need to render a calendar, but only shows the whole week of the current week. I've added an element for the date where I've set the default value to something like below ...
1
vote
1answer
34 views

Add another item button goes missing with unlimited, repeating dates

Unlimited + repeating date fields seem to not work together. I would like to be able to add unlimited date fields that may or may not have repeating functionality. I currently have both unlimited ...
2
votes
2answers
54 views

How to use the Time ago view formatter when you have an end date collected in your date field?

I have a date field in a content type with a collected "end date" and I want to show the end date in a view with the Time ago view formatter. The problem is that I don't find where to select the end ...
1
vote
1answer
26 views

How do I change the date format depending on Start and End date in Drupal 7

I have a content type called 'Events' including the fields: Title Thumbnail Date (Can be a start, or both a start and end date) I have created a view that takes this content type and outputs it ...
0
votes
0answers
14 views

Date API not accepting date format in a view filter

I'm using Availability Calendars and Date API modules and I need to filter views using the availability data. The module provides a view exposed filter which allows to choose an arrival and a ...
0
votes
0answers
7 views

Entity Metadata Wrapper - Date field without end date

I'm creating programmatically one content type using entity_metadata_wrapper. I'm copying a date field (without end date) from another wrapper. I found this documentation quite good here: ...
0
votes
0answers
11 views

Charts, how to format a date/time from external table on X-axis in Views

I am using the Data Module to bring in some data from an external database. Have configured a View to display a Chart (using the Charts Module) of the columns I require and it works great, except ...
1
vote
1answer
29 views

Drupal 7 Views - Date Filter Cannot See Year

I am trying to create a view with exposed filters for a date field with a start date and required end date. However, I cannot see the year for the date when I created the filter. I can only see the ...
0
votes
1answer
35 views

How to translate dates?

I have a calendar view in my Drupal 7 website, that looks like this: And I also have a date field in a Webform: All of these appear in english, of course. But, I want to translate all dates to ...
0
votes
0answers
21 views

How to get the last updated time stamp of a field in field collection

How to get the last updated time stamp of a field in field collection.Is there any drupal built in function to get the timestamp
0
votes
0answers
7 views

How to define custom widget for datetime field type

I want to define a custom widget for datetime field type. I search in www but I found no suitable help and example. Also I studied date pop-up module but really it was very complicated. Do you know ...
0
votes
0answers
24 views

Alter field not work in hook_field_widget_form_alter function

I want to add some extra class to all date fields that their widgets are date_popup So I used hook_field_widget_form_alter here is my function function ...
0
votes
1answer
40 views

Custom date range format on a node by node basis

I'm working on a way to alter the way a date field, field_node_date, is formatted when rendered. Currently, on the content type I'm working on, the Long format is being used (e.g. Monday 18 January ...
0
votes
0answers
16 views

Form framework doesn't render date type after ajax callback

I have an ajax callback which returns a date type input field. The problem is any other input type other than date is generated, but date type is not rendered at all. The title, and description is ...
0
votes
0answers
13 views

Limit date field to every other Wednesday

I would like to limit dates to every other Wednesday (starting with January 1, 2016). I installed Date Restrictions but do not know how to build a sub-module which limits to every other Wednesday. As ...
1
vote
2answers
33 views

Sorting Views by current week

The Date module with Views has functionality to filter dates with a granularity by Day, Months, Year, etc. but not for weeks. So to do this with a Contextual Filter and PHP code to retrieve the ...
1
vote
1answer
32 views

Views Contextual Filter by current day

I am using the Date Repeat Entity module for generating a checklist for users. I am able to use Views to display the list in chronological order for tasks relevant for the current user using a ...
1
vote
1answer
65 views

Custom date format in email body

I have a confirmation email. In the confirmation email i print the Date of the event (Date field) in the e-mail body by [entity-fetched:field_event_date]. This is working fine but the Date is printed ...
0
votes
1answer
17 views

Sorting Views by Day and Month only

For a Birthday field using the Date module, Views sorts it by year. This puts the dates in basically random order once you format it to display only the month and the day. Could it sort by day and ...
0
votes
0answers
53 views

Start date and end date with optional components

I need to have optional start date and end date with 'All Day' option. The date values may filled in following ways: day-month-year and time day-month-year (without time using the 'All Day' option) ...
0
votes
1answer
32 views

How to use ungrouped date fields as data for Charts Views?

I have a content type with the following date fields: Start Date Deadline Date End Date Deadline date is programmatically calculated, where as Start and End are based on user input. There is a ...
5
votes
3answers
149 views

Change article date format

I'd like to change the date format that is used for articles in Drupal 8. It looks like it uses the Default medium date format by default. I added my own format at admin/config/regional/date-time, but ...
1
vote
0answers
28 views

Epoch time is not saving to DB

I am trying to use Epoch time for my date field. According to the php.net/date U is for Epoch time, so this is how I set it up: When I put an epoch time, such as the current time, 1451362409 ...
1
vote
0answers
25 views

How can I change the path of calendar views?

I use the calendar module and the views come with it. What I want is: When my url is http:mysite/2015 display the year view and when my url is http:mysite/2015/03 display the month view (March of ...
1
vote
2answers
41 views

How can I rewrite a date field “End Date” to be “present” if no value is entered?

I have a date field for an item in which I am entering a range of years. I have created a view which displays the start date and end date as individual fields. Typical output looks like this: ...
0
votes
1answer
31 views

Calendar - Adding relationship to contextual date filter

I would like to create an Calendar view of some interships for a certain student. But when I change the Contextual (Date) filter to use an relationship no results are shown in the calendar. When I ...
2
votes
1answer
43 views

How to make a chart in Views with date as x-axis (using the charts module)?

I want to make a simple view using the Charts module. The x-axis will be a custom field of type Date that I want to show in Y-m-d format and grouped by the same date. The y-axis will be NID with ...
0
votes
1answer
26 views

How to show views calendar by node field_date

I have a date field with start,end dates. But i can't understood how to show it in a views block by contextial filter date -> content from node Thanks for any help!)
1
vote
0answers
23 views

Date exposed filter - Hour of day

I have a content type with a "Date Repeat" field. I also have a view displaying events on a calendar. What I need is to have some exposed filters to show only the events that happen between 2 and 6 ...
0
votes
2answers
24 views

Get yesterday's content with contextual filter in views block

I have a view and I try to show only yesterday's content. I add a contextual filter "Content: Created date". If I select "Current Date" from "Provide default value" its works perfectly. But I select ...
0
votes
0answers
60 views

When setting existing date field programmatically date is AM instead of PM - interpreted as 24 hour time [closed]

I have an existing date field in a custom content type, called a 'journal entry'. I am programmatically creating nodes of this content type in a custom module. I used the Date module to create a ...
1
vote
1answer
23 views

strtotime() doesn't return unix timestamp in custom view when $row->field_date is an English date

I'm confused. I'm using a Global: PHP field inside a view to tweak the output of the row based on the date value of a certain field. print (strtotime((string)$row->field_date)); Doesn't seem to ...
0
votes
1answer
20 views

Separate Display for Start date and End date using Date module

I have a date field which collects both start date and end date. I would like to display start date and end date as seprate in the display. I don't see any options in the display page. I am sure I ...
2
votes
2answers
73 views

How to calculate datetime in hours?

I have a date time field to input working hours and then I need calculate total work hours. I was try using Global math expression in views, but the results is 0, although I was try to change views ...
0
votes
0answers
12 views

Group view by day that spans several days

I am having a problem setting up table groups in views. I have managed to set up nested grouping by month and then by day but if the date field has multiple days the grouping only outputs a single ...
0
votes
1answer
18 views

Aggregating by date field

I've been trying to aggregate (SUM) by a date field with a custom format (YYYY, MM) but its not working as expected. I tried Views Date Format SQL and Merge rows modules but didn't work for me. Also, ...
0
votes
0answers
14 views

Support for different calendars such as Jalali or Arabic

Does Drupal 8 support calendars like the Jalali or the Arabic calendar?
0
votes
0answers
17 views

Last update filter

I'm developing an application that will access Drupal using services and one of the parameters used is the date, I used the filter "Content: Updated date (Updated date)" but instead of giving me just ...
0
votes
0answers
41 views

2 related content types in Views with date field

In a new project I want to create a View which displays 2 related content types. The first content type is a school subject having a Date Repeat field with perhaps a weekly repeating rule. The ...
1
vote
2answers
36 views

How to perform views date calculations using global math?

Is it possible to calculate date in Views like to calculate two cell using global math for this case? Example: Nick's birth of date was 20/10/2005 Only 20 years old can join the club So before ...
0
votes
1answer
75 views

Long Ajax error using Date module Views and Fullcalendar

I have searched for many posts and i am already doing the suggestions. Nothing is fixing this. Fullcalendar module says to use the "use ajax" option within views but it throws a huge error. ...
0
votes
0answers
12 views

Create arrays of dates in CCK list

I want to create a list of dates in a CCK select list with PHP arrays. I don't have any luck with this, any help is appreciated. Minimum date: +4 days Maximum date: +2 months Only bussines days ...
0
votes
1answer
26 views

Nodes created on 1st date of the month are not showing up on Calendar

I am using the following modules Calendar Date There is an attendance content type with a field of type date. The nodes of this content type get pulled in a Calendar. But, nodes which are created ...
0
votes
3answers
39 views

How to get unpublished date of a node?

Is there a way to get the unpublished date of a node? I want the date of unpublishing of nodes to be displayed in the view in a grid. I need it non-programmatically (ie, tweaking the UI), but if it ...
0
votes
1answer
22 views

How to give default today date value in exposed filter?

I am using exposed filter condition for date field in views. I want to see the data in view by current date as default ..for that i am trying to give date field should be default by today date and ...
3
votes
1answer
52 views

Views: Highlight today's post based on previously referenced node

I have a weekly recipe list view, I manually create the list at the first day of the week. for instance I assign Node 1 for Reference field labeled with Monday, Node 2 for Tuesday and so on using ...