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

learn more… | top users | synonyms

3
votes
1answer
35 views

How to change the default date format in Rules?

I've created a rule to send an html email which contains a date, printed using tokens as [commerce-order:field_delivery_date]. In email, the date looks like 2016-07-08 00:00:00 to 2016-08-02 00:00:00. ...
1
vote
2answers
27 views

How do I set start date with the core date field?

I need set the start date (e.g. now +1) for my date field. How can I do this on Drupal 8.1.x?
1
vote
1answer
23 views

Change date format on editing

I'm using a date field on my custom type, if I use "select" widget for node editing, I can choose only between "YMD","MDY" and "DMY" formats. Is there a way to add custom formats? I need an "only ...
0
votes
1answer
11 views

How to set a specific date (fixed value) as default value on a date field?

I have a commerce order on which I have added a date field. The options for the default value are Now or Relative. How can I add a fixed default value, f.x. 20 Aug 2016?
0
votes
0answers
13 views

Date field to save events [closed]

I need to save some events(Medical checkup, Insurance renewal, Tax filing etc) on a specific date in a node. Number of events will be different with each nodes. I had tried Multi-field module to ...
0
votes
0answers
5 views

Views filter date field by month only when date field has year, month, day?

A node has a date field (e.g. the day, month, and year of the founding of a city). A View should display nodes which are filtered according to the current month. E.g. a node with a date field of 5 ...
0
votes
3answers
71 views

Inserting the value from Datetime field form

I have a form where the user can input datetime and then I want to store it in the database. Here's my schema : 'start' => array( 'type' => 'varchar', 'mysql_type' => 'datetime', ...
0
votes
2answers
35 views

How do I customize the date-submit part in comment section?

I am formatting the Date/Submit part of the comment. By default when we post any comment, it comes in the format of, Submitted by author-name on Sun, 06/12/2016 - 20:34. I am using Adaptive theme. I ...
1
vote
1answer
47 views

Change size of the time textbox

I want to change the size of the time textbox but I can't find a way to do it. $form['feld']['start'] = array( '#type' => 'date_popup', '#title' => 'Start', '#size' =...
2
votes
2answers
41 views

Setting anonymous user timezone on page load

I'm developing a radio site where show times are displayed. Since it's an Internet radio station, I need to be able to display times in the user's timezone. I'm able to detect which timezone a user ...
0
votes
1answer
25 views

How do I get a field value?

I am using the Business Hours module. It allows you to specify two time periods per day, for the 7 days of the week. So you could, for example, say: 9 t 1 Mondays to Fridays, and 2 - 5, Mondays to ...
1
vote
1answer
36 views

Views Using Current Month +- One Month

I am trying to get a list of seasonal items that dynamically display items based on the current month. It also includes items from the prior month and future month. I have created a content type for ...
0
votes
0answers
18 views

Post date results in WSOD

Any view that contains a reference to the Post Date gives a WSOD. There are no log entries in Drupal or Apache and adding: error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('...
3
votes
3answers
64 views

Set a Date field with Rules?

I have a form that users can fill out and it creates a node, an event node to be shown in the community calendar of my website. I'm using Rules to create the new node when the "Webform: After a ...
0
votes
2answers
26 views

How to delete all data in one field of a particular content type?

We have a content type basic page that has a Date field (field_bp_date). We want to use the hook_update to delete all data in this field. We are having trouble figuring out what is the best way to ...
0
votes
1answer
14 views

Change labels of date select fields

I'm using the Form API to create a Date of Birth field with lists for month, day and year. $form['dob'] = array( '#type' => 'date_select', '#title' => t('Date of birth'), '#...
3
votes
1answer
27 views

How to flag node when “event date” has passed and send notice to authors of flagged nodes?

I have a "delivery date" field in my content type that users choose when creating a node. When this date passes I want the notice to be sent to the nodeauthor. As far as I see, I need to flag the ...
1
vote
0answers
22 views

Views slow load time with date contextual filter

We have a Drupal site with a view of events content type (which is a list of events happening around the area). There is a display with a date contextual filter that you can filter based on a single ...
1
vote
3answers
87 views

set default timezone, date first day and date format medium via drush

Is there is away to set : default timezone date first day date format medium via drush instead of doing it via drupal web interface ?
1
vote
0answers
16 views

Missing Year Filter in Views

similar issue to Drupal 7 Views - Date Filter Cannot See Year However I verified the format being used is the short date format and in the datepopup.module file, I made sure it was set to m/d/Y but ...
1
vote
1answer
17 views

Change date format of a single result in a view

I have a view that gives me a list of nodes titles and when it was last updated. I want to display the changed date with only time if it is today, otherwise i just want the date. i.e. 17.00 Title ...
0
votes
1answer
47 views

How to add select years and months select Drupal 8.1 date picker?

There is no configuration option available in the backoffice nor from configuration synchronisation variables that allows to edit the settings for the jQuery datepicker widget embed in core. My ...
0
votes
0answers
24 views

Date Popup Script throws an error

I have installed date 7.x-2.8 module. Enabling Date API 7.x-2.8 , Date pop-up 7.x-2.8 and Date popup timepicker 7.x-1.0-beta1 . I have this form element: $form['myid_summary']['summary_from'] = ...
3
votes
1answer
40 views

Display Today's Birthday in Block

I have a Content Type 'Teams' which have name as Title field, Image field and Date of birth field using Date module. I want to display Today's birthday in block. I've tried using views but could ...
0
votes
1answer
12 views

Multiple dates token for auto node title

I am using this token to create node title [node:field-date-concert:custom:j-m-Y] and it works fine if there is one value for date in node. Problem is that if there are 2 or more values i only get ...
3
votes
1answer
31 views

How to assign content to user for manage turns?

I need to create a system to assign turns to a people register in the site, for this need contemplate: The administer assign turn to user in specified place.ex(turn 1, place 1, user 1) There are two ...
2
votes
1answer
21 views

How to add time element to open date and close date when adding a quiz

I am using the following modules. Quiz, Version 7.x-4.0-rc2 Date, Version 7.x-2.9 When adding a quiz, in the availability options tab, I want to be able to set the time as well. In the open ...
1
vote
0answers
52 views

Expose date filter in view

How can I configure an exposed filter so that users can filter my site content by creation date, preferably using a date picker? I tried using Content: Authored on as filter, but it gets me a text ...
1
vote
0answers
7 views

added date filter to one of the views shows ajax error:length undefined

I have added a date module to my site and used date filter in views i.e. to search news content through date. This filter works fine in preview section, but in main page it shows Ajax error as length ...
0
votes
1answer
17 views

Get clean date without any HTML tags

I am using the Date module together with a view to display dates, and I need to get the date timestamp. The problem is that $fields['date_in_timestamp'] content comes wrapped in HTML. <span class="...
-1
votes
1answer
63 views

change date format in drupal8 node

I use date field in content for show time ago in dupal 8 . Now I want change date for since edit time . For EX ( date field is hidden ) Create content date show : 3 minutes ago Edit content date ...
0
votes
2answers
16 views

Date from to views how to do? [duplicate]

I want to create filter for nodes that were created from and to..... Date looks like this 05/02/2016 - 05:07 I created date field and selected post date and input this date above and it did not work.....
0
votes
0answers
40 views

Entity Metadata Wrapper: set Date Field with unknown Timezone

I need to create nodes programmatically and I chose to use the helpful EntityMetadataWrappers. But I have a real doubt about setting datefields. I found in this thread (and checked on my code) ...
0
votes
1answer
22 views

D8 date popup on exposed filter

How can I get a date popup on the exposed filters of a view on D8 ? I do not see the option, is it on D8 yet?
1
vote
2answers
92 views

How do I get the Unix timestamp?

I want to use format_date(), but it requires a Unix timestamp and my dates are ISO. Is there a drupal way to convert ISO date to Unix timestamp? If I use strtotime, I lose my timezone offset.
0
votes
1answer
17 views

How to disable auto submit on value change in date_popup form? [closed]

Is there a quick way how to disable auto submit on value change in date_popup forms? Thanks.
0
votes
1answer
24 views

jQuery Datepicker : How to add option which accepts a function as an argument

I have added a date_popup field to a form : $form['arrival_date'] = array( '#type' => 'date_popup', '#title' => t('Arrival date'), ...
0
votes
2answers
100 views

How can I use 'xx time ago' for date format in drupal8 nodes?

How can I use 'xx time ago' for date format in drupal8 nodes ? I want to replace "xx time ago" with {{ date }} in node. In drupal 7 worked with this code : <?php print format_interval(time()-$...
0
votes
2answers
38 views

how to Display author and date information according to my requirement?

I am created a content type with field Title, Project code, Advertise and Body. I want to display Author name and date information after Project code but by default it showing after title field so ...
0
votes
1answer
27 views

How to compare current year with an integer field in Rules?

I would like to compare the current year with an integer field (let's say a "year of subscription" field) using Rules (if the field value is lower than the current year, the user has no access to a ...
0
votes
1answer
42 views

DateTime iso format in api

I have created an api that filter out unixtime format. Currently, we can filter using /api/blogs?filter[created][value]=1426766400&filter[created][operator]=">="&api_key=DEMO_KEY That ...
1
vote
2answers
37 views

modify date token in View to extract only year?

We have a content type using a date field, in which the date is entered in the format mm/yyyy. An example entry might be 04/2016. In one particular View, we want to use only the Year value. It appears ...
0
votes
0answers
39 views

Views - exposed date filter adds a timezone offset in query

In Drupal 8, when creating a view with an exposed filter on a Date field (which is in date only mode), the resulting query removes some hours based on my timezone. I'm in the UTC+2 timezone, so a ...
0
votes
2answers
21 views

How to reorder the date in a view expose filter?

I have created a view with date expose filter. Currently filter is working fine but i need to reorder the day and month. From month/day/year To day/month/year
0
votes
1answer
29 views

Filtering comment by date range in Views

I have created a view to filter comments by date range. For date range i am using between operator. View type : Comment Date : comment created (default field) Issue : When i am trying to filter ...
0
votes
1answer
15 views

Filtering date fields in Views - How can I test for NULL

* QUESTION EDITED - was previously two separate issues, now limiting question to one issue only * When I add a Date field to the Filter criteria, I get a choice of operators "Is less than", "Is less ...
1
vote
0answers
15 views

Restful API: Change date format from unixtime to ISO-8601 [duplicate]

Applying the date_iso8601 Drupal function in a simple process_callbacks on the public_fields in the class file for each date field works to convert the output/display of the date format, but does not ...
0
votes
2answers
15 views

How to hide time from the date display?

In a view using Articles and Blog posts sorted by recent post date, I'm using [Content: Post date] and I would like to display (as a column on the display) as only the date and not the time, i.e. 2016/...
1
vote
0answers
10 views

Don't show end-date for single-day event; show it for multi-day event

I have one multi-entry date field in an event content type. In the event view, I use multiple date fields with different date types to display the date as MMM dd-dd start:time - end:time The view ...
1
vote
1answer
28 views

Views event listing by date with up/down infinite scroll

I have a content type called "Event" which contains a "Date" field. What I want to achive: 1) Create a view which can display 5 events sorted by "Date" and displayed as following: 2 events which ...