<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>DateTime — DataTables forums</title>
        <link>https://next.datatables.net/forums/</link>
        <pubDate>Wed, 22 Jul 2026 01:33:25 +0000</pubDate>
        <language>en</language>
            <description>DateTime — DataTables forums</description>
    <language>en</language>
    <atom:link href="https://next.datatables.net/forums/categories/datetime/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>How to open the DateTime calendar on a specific month/year when the field value is empty</title>
        <link>https://next.datatables.net/forums/discussion/81653/how-to-open-the-datetime-calendar-on-a-specific-month-year-when-the-field-value-is-empty</link>
        <pubDate>Fri, 06 Feb 2026 06:35:04 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>ktadrowski</dc:creator>
        <guid isPermaLink="false">81653@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:<br />
We use Editor’s datetime field for a line-item date that must fall within a billing period. Our field config:</p>

<p><code>{</code>
<code>name: "line_item_date",</code>
<code>className: 'req-field',</code>
<code>label: "Some label",</code>
<code>type: "datetime",</code>
<code>keyInput: false,</code>
<code>displayFormat: localDateformat.dateFormat,</code>
<code>wireFormat: valueDateFormat,</code>
<code>},</code></p>

<p>We set min/max from the billing dates:</p>

<p><code>const dateField = editor.field('line_item_date');</code><br />
<code>dateField.minDate(formatToValueDateFormat(minDate));</code><br />
<code>dateField.maxDate(formatToValueDateFormat(maxDate));</code></p>

<p>When the billing period is in the past (e.g. Feb–Mar 2025) and the user edits a row with the date field empty, the picker opens on today’s month/year. Today is outside the range, so the year dropdown shows "-".</p>

<p><img src="https://datatables.net/forums/uploads/editor/tg/lm74bc6yf3gx.png" alt="" title="" /></p>

<p>We know we could use nullDefault: true and def(minDate), but that would set a default date. We only want the calendar to open on a month/year inside the range and leave the value empty until the user picks.</p>

<p>Is there a supported way to control which month/year the calendar shows when it opens with an empty value?</p>
]]>
        </description>
    </item>
    <item>
        <title>DateTime display() as an option</title>
        <link>https://next.datatables.net/forums/discussion/81451/datetime-display-as-an-option</link>
        <pubDate>Wed, 15 Oct 2025 12:55:25 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">81451@/forums/discussions</guid>
        <description><![CDATA[<p>For the DateTime plugin, <code>display()</code> is available through the api, but an option would be helpful as well.</p>

<pre><code>{
    label: 'Some date field',
    name: 'some_date',
    type: 'datetime',
    opts: {
        display: {
            year: 1982,
            month: 10
        }
    }
},   
</code></pre>

<p>or maybe...</p>

<pre><code>{
    label: 'Some date field',
    name: 'some_date',
    type: 'datetime',
    opts: {
        display: [1982, 10]
    }
},   
</code></pre>

<p>The <code>display</code> option would probably only take affect if there is no current value or default value set.</p>
]]>
        </description>
    </item>
    <item>
        <title>Editor datetime input is malformed</title>
        <link>https://next.datatables.net/forums/discussion/81393/editor-datetime-input-is-malformed</link>
        <pubDate>Wed, 24 Sep 2025 18:38:46 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>harkirat.singh</dc:creator>
        <guid isPermaLink="false">81393@/forums/discussions</guid>
        <description><![CDATA[<p>The date input for the editor with bootstrap5 styling and floating labels is malformed. It has two overlapping input boxes.<br />
You can see it at the <a rel="nofollow" href="https://editor.datatables.net/examples/styling/bootstrap5FloatingLabels.html" title="example">example</a> itself</p>

<p><img src="https://datatables.net/forums/uploads/editor/oz/p4ekl5qel6ds.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Date picker with jQuery UI</title>
        <link>https://next.datatables.net/forums/discussion/81422/date-picker-with-jquery-ui</link>
        <pubDate>Mon, 06 Oct 2025 11:03:12 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>dte1</dc:creator>
        <guid isPermaLink="false">81422@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, am I the only one experiencing an error with the date picker?</p>

<p>Example: <a rel="nofollow" href="https://editor.datatables.net/examples/dates/dates.html">https://editor.datatables.net/examples/dates/dates.html</a></p>

<p>When I select "DataTables" as the framework, everything works fine.<br />
However, when I select "jQuery UI" as the framework, the direct selection of a month or year in the date picker no longer works. The selection box flashes briefly and then disappears immediately.</p>

<p>This issue occurs with the Firefox browser (143.0.3).<br />
Chrome (140.0.7339.208) doesn’t seem to be affected.</p>
]]>
        </description>
    </item>
    <item>
        <title>DateTime calendar shown in Editor?</title>
        <link>https://next.datatables.net/forums/discussion/81050/datetime-calendar-shown-in-editor</link>
        <pubDate>Tue, 17 Jun 2025 11:15:42 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">81050@/forums/discussions</guid>
        <description><![CDATA[<p>Seems like one time I saw an example of the DataTime control being shown in an Editor form without the text input (i.e., only the calendar itself was shown on the form), but I cannot find that again or find an example that has that.</p>

<p>Am I misremembering or overlooking it?</p>
]]>
        </description>
    </item>
    <item>
        <title>DateTime Standalone - how to update minDate</title>
        <link>https://next.datatables.net/forums/discussion/81137/datetime-standalone-how-to-update-mindate</link>
        <pubDate>Fri, 11 Jul 2025 11:19:08 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>tomduke</dc:creator>
        <guid isPermaLink="false">81137@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I want to update the minDate for a second DateTime field based on the selected date of a first DateTime field.</p>

<p>I can update the value of the second field using this:</p>

<pre><code>var dd1 = new DateTime(document.getElementById('departure_date_1'), {
    format: 'DD/MM/YYYY HH:mm',
    onChange: function (value, date, input) {
        ad1.val(date);
    }
});

var ad1 = new DateTime(document.getElementById('arrival_date_1'), {
    format: 'DD/MM/YYYY HH:mm',
}); 
</code></pre>

<p>But I can't figure out how to update the minDate, this does not work:</p>

<pre><code>var dd1 = new DateTime(document.getElementById('departure_date_1'), {
    format: 'DD/MM/YYYY HH:mm',
    onChange: function (value, date, input) {
        ad1.val(date);
    }
});

var ad1 = new DateTime(document.getElementById('arrival_date_1'), {
    format: 'DD/MM/YYYY HH:mm',
}); 
</code></pre>

<p>Any ideas?</p>

<p>Thanks<br />
- Tom</p>
]]>
        </description>
    </item>
    <item>
        <title>Using ISO strings for DateTime minDate can show year &lt; minDate</title>
        <link>https://next.datatables.net/forums/discussion/81041/using-iso-strings-for-datetime-mindate-can-show-year-mindate</link>
        <pubDate>Fri, 13 Jun 2025 14:13:31 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">81041@/forums/discussions</guid>
        <description><![CDATA[<p>I notice an issue with the DateTime picker on this page: <a rel="nofollow" href="https://editor.datatables.net/examples/dates/options-min-max.html">https://editor.datatables.net/examples/dates/options-min-max.html</a></p>

<p>Note that 2010 is present in the select for the year even though <code>minDate</code> is 2011-01-01 so years prior to 2011 shouldn't show.</p>

<p>For anyone not familiar with this phenomenon, this is caused by <code>minDate</code> and <code>maxDate</code> being passed as strings in ISO format (<code>YYYY-MM-DD</code>) to their <code>new Date()</code> objects,.  The Date object will convert those strings to local time and give this unexpected result.</p>

<p>For the uninitiated this can be particularly frustrating:</p>

<pre><code>const d = new Date('2011-01-01');  // ISO format of `YYYY-MM-DD`

console.log(d.getFullYear()); // = 2010???
</code></pre>

<p>But here's a way to see what's actually happening:</p>

<pre><code>const d = new Date('2011-01-01');  // ISO format of `YYYY-MM-DD`

console.log(d.toISOString()); // "2011-01-01T00:00:00.000Z"

console.log(d.toString()); // Local "Fri Dec 31 2010 19:00:00 GMT-0500 (Eastern Standard Time)"

console.log(d.getFullYear()); // 2010
</code></pre>

<p>To avoid this, construct the date in local time:</p>

<pre><code>const d = new Date(2011, 0, 1); // Month is zero-indexed (0 = January)

console.log(d.toString()); // "Sat Jan 01 2011 00:00:00 GMT-0500 (Eastern Standard Time)"

console.log(d.getFullYear()); // 2011
</code></pre>

<p>Using <code>new Date(YYYY, MM-1, DD)</code> will ensure you stay in the local zone and the DateTime select won’t sneak in that additional year.</p>

<p>If you still prefer to pass the ISO format, here's a function that can do the conversion</p>

<pre><code>function newLocalDate(date) {
    const parts = date.split('-');   // ["YYYY","MM","DD"]
    const year  = parts[0];
    const month = parts[1] - 1;  // zero-indexed (0 = January)
    const day   = parts[2];      // day-of-month
    
    // Build local-time Date:
    return new Date(year, month, day);
}


...
opts: {
    minDate: newLocalDate('2011-03-01'),
    maxDate: newLocalDate('2011-10-31')
}
...
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Possible DateTime improvements</title>
        <link>https://next.datatables.net/forums/discussion/81042/possible-datetime-improvements</link>
        <pubDate>Fri, 13 Jun 2025 14:45:56 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">81042@/forums/discussions</guid>
        <description><![CDATA[<p>If I were doing a small wish list for the DateTime control, then ...</p>

<p>The select for the year would be disabled (or eliminated) if the minDate and maxDate year are the same, i.e., there would be no select for the year since 2011 is the only possible option:</p>

<pre><code>opts: {
    minDate: new Date('2011-03-01'),
    maxDate: new Date('2011-10-31')
}
</code></pre>

<p>The months could be dynamic based on the year, i.e., this would have Oct, Nov, and Dec for 2011 and Jan, Feb, and Mar for 2012:</p>

<pre><code>opts: {
    minDate: new Date('2011-09-01'),
    maxDate: new Date('2012-03-31')
}
</code></pre>

<p>Finally, the select for the month would be disabled (or eliminated) if the year and the month are the same, i.e., there would be no select for the month or the year since July 2011 are the only possible options:</p>

<pre><code>opts: {
    minDate: new Date('2011-07-01'),
    maxDate: new Date('2011-07-31')
}
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Events for DateTime picker?</title>
        <link>https://next.datatables.net/forums/discussion/79698/events-for-datetime-picker</link>
        <pubDate>Tue, 20 Aug 2024 11:57:24 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">79698@/forums/discussions</guid>
        <description><![CDATA[<p>Are there any events for the DateTime picker, such as when the user changes the month or the year or anything like that?</p>

<p>I can attach events to the input, but I'm looking for when a user clicks the backward and forward arrow, etc.</p>
]]>
        </description>
    </item>
    <item>
        <title>How do I dynamically update hoursAvailable based when the date is changed in the dropdown</title>
        <link>https://next.datatables.net/forums/discussion/79291/how-do-i-dynamically-update-hoursavailable-based-when-the-date-is-changed-in-the-dropdown</link>
        <pubDate>Thu, 27 Jun 2024 18:15:00 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>rodegard</dc:creator>
        <guid isPermaLink="false">79291@/forums/discussions</guid>
        <description><![CDATA[<p>I am trying to figure out how to update the hoursAvailable when the user selects a date from the dateTime picker within an editor. If it is the current date I only want to allow hours up to current hour but if it is a previous date I want to allow all hours. but when I look at the following URL (<a rel="nofollow" href="https://datatables.net/extensions/datetime/option/hoursAvailable" title="hoursAvailable">hoursAvailable</a>)  it only shows the following example which isn't helpful within the editor:</p>

<pre><code>$(document).ready(function () {
    new DateTime(document.getElementById('test'), {
        hoursAvailable: [8, 9, 10]
    });
});
</code></pre>

<p>I can't find any example for setting it like I would for maxDate in the dependent method like this:</p>

<pre><code>        proxCardLotAccessEditor.field.dependent('actualUsageDateTime',
            function(val, data, callback, e) {
             ....
                     proxCardLotAccessEditor.field('effectiveDate').maxDate(maxDate);
             ....
           });
</code></pre>

<p>How can I dynamically update hoursAvailable option on a dateTime field in and editor when the date is changed?</p>

<p>Regards,</p>

<p>RobO.</p>
]]>
        </description>
    </item>
    <item>
        <title>picker strange effects</title>
        <link>https://next.datatables.net/forums/discussion/77057/picker-strange-effects</link>
        <pubDate>Wed, 30 Aug 2023 06:54:56 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Lapointe</dc:creator>
        <guid isPermaLink="false">77057@/forums/discussions</guid>
        <description><![CDATA[<p>In sample <a rel="nofollow" href="https://editor.datatables.net/examples/dates/time-increment" title="https://editor.datatables.net/examples/dates/time-increment"></a><a rel="nofollow" href="https://editor.datatables.net/examples/dates/time-increment">https://editor.datatables.net/examples/dates/time-increment</a> minutesIncrement is set to 15 and control appears as <img src="https://datatables.net/forums/uploads/editor/kg/6xh7hodhvdxo.png" alt="" title="" /><br />
What does minutesIncrement do ? control display should be 00 15 30 45, not ?</p>

<p>In sample <a rel="nofollow" href="https://editor.datatables.net/examples/dates/time.html" title="https://editor.datatables.net/examples/dates/time.html"></a><a rel="nofollow" href="https://editor.datatables.net/examples/dates/time.html">https://editor.datatables.net/examples/dates/time.html</a><br />
 add record and open datetime picker for time with empty value (def set to null) and then select hour.<br />
Minutes and seconds are filled with current values (the same if select a minute or second). Others time parts are set when selecting a time part<br />
<img src="https://datatables.net/forums/uploads/editor/jq/mpz0oqo24np7.png" alt="" title="" /><br />
Normal ?</p>
]]>
        </description>
    </item>
    <item>
        <title>Why My Calendar doesnt show propertly?</title>
        <link>https://next.datatables.net/forums/discussion/75204/why-my-calendar-doesnt-show-propertly</link>
        <pubDate>Tue, 24 Jan 2023 06:47:36 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>impex09</dc:creator>
        <guid isPermaLink="false">75204@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I have a colum as datetime, but when I have to create a new field and choice the datetime colum, this show very bad.<br />
why?</p>

<pre><code>        {
            "label": "Meeting:",
            "name": "new_meeting.date",
            "type": "datetime",
            "format": "ddd, D MMM YY"
        },
</code></pre>

<p>please see the image attached.</p>

<p>thank you</p>
]]>
        </description>
    </item>
    <item>
        <title>Time Picker: Auto close on time selection</title>
        <link>https://next.datatables.net/forums/discussion/71637/time-picker-auto-close-on-time-selection</link>
        <pubDate>Sun, 13 Feb 2022 16:31:59 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>marcoheuer</dc:creator>
        <guid isPermaLink="false">71637@/forums/discussions</guid>
        <description><![CDATA[<p>Hi there -<br />
Is it possible to have the time picker auto close when a time is selected?<br />
<a rel="nofollow" href="https://editor.datatables.net/examples/dates/time.html">https://editor.datatables.net/examples/dates/time.html</a></p>

<p>At the moment, one needs to click/tap out of the picker for it to close.<br />
Ideally it should behave, just like the date picker.</p>

<p>Thank you!<br />
Cheers,<br />
Marco</p>
]]>
        </description>
    </item>
    <item>
        <title>How do I show date col. in date format?</title>
        <link>https://next.datatables.net/forums/discussion/67930/how-do-i-show-date-col-in-date-format</link>
        <pubDate>Wed, 14 Apr 2021 18:40:37 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Akriti</dc:creator>
        <guid isPermaLink="false">67930@/forums/discussions</guid>
        <description><![CDATA[<p>In my datatable I have a column with date format (ex. "15/05/2020") but when export to excel the format date is General.<br />
Is there a way to explicitly tell datatables, when exporting data, make sure Date column is formatted as a date in the xlsx document?<br />
The example here as the same problem. The format of the date cells is general not date.</p>

<p><a rel="nofollow" href="https://datatables.net/extensions/buttons/examples/html5/simple.html">https://datatables.net/extensions/buttons/examples/html5/simple.html</a></p>
]]>
        </description>
    </item>
    <item>
        <title>Automatically adding current date/time into Date Added and Last Modified fields in Editor</title>
        <link>https://next.datatables.net/forums/discussion/73770/automatically-adding-current-date-time-into-date-added-and-last-modified-fields-in-editor</link>
        <pubDate>Sun, 21 Aug 2022 12:25:47 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>shawngibson</dc:creator>
        <guid isPermaLink="false">73770@/forums/discussions</guid>
        <description><![CDATA[<p>Hi all,</p>

<p>Is it possible to have a date_added field in a table which is automatically populated with the current date and time upon record creation?</p>

<p>Similarly, can a last_modified field be initially left blank or populated with the same date and time as the date_added field, then similarly time-stamped automatically any time the record is later edited (overwriting any previous last_modified timestamp)?</p>

<p>I'm sure this is quite common, but I'm new at this and not a real programmer by any stretch lol...though I am thoroughly enjoying my new student status thanks to DataTables and Editor.</p>

<p>Merci:)<br />
Shawn</p>
]]>
        </description>
    </item>
    <item>
        <title>Hi</title>
        <link>https://next.datatables.net/forums/discussion/73457/hi</link>
        <pubDate>Fri, 22 Jul 2022 18:14:12 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Lapointe</dc:creator>
        <guid isPermaLink="false">73457@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:</p>
]]>
        </description>
    </item>
    <item>
        <title>DateTime feature request</title>
        <link>https://next.datatables.net/forums/discussion/73127/datetime-feature-request</link>
        <pubDate>Sun, 19 Jun 2022 13:42:25 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>kthorngren</dc:creator>
        <guid isPermaLink="false">73127@/forums/discussions</guid>
        <description><![CDATA[<p>Using DateTime with date range filters can be problematic if the table dates aren't ISO format.  DateTime returns the date with the local time.  This doesn't work well when using moment to parse the dates.  Use this <a rel="nofollow" href="http://live.datatables.net/dujawuno/9/edit">example</a> from this <a rel="nofollow" href="http://live.datatables.net/dujawuno/9/edit">thread</a> to see the problem.  Choose June 16 for the min date and the following will appear in the output for the row with June 16:</p>

<pre><code>min date date: Thu Jun 16 2022 05:31:26 GMT-0400 (Eastern Daylight Time)
moment date: q {_isAMomentObject: true, _i: '16/06/2022', _f: 'DD/MM/YYYY h:m A', _isUTC: false, _pf: {…}, …}
</code></pre>

<p>The comparison of <code>(min &lt;= date &amp;&amp; max === null)</code> will not pass so the row is hidden.</p>

<p>There are other threads with similar problems:<br />
<a rel="nofollow" href="https://datatables.net/forums/discussion/71518/date-range-filter-with-dd-mm-yyyy-format#latest">https://datatables.net/forums/discussion/71518/date-range-filter-with-dd-mm-yyyy-format#latest</a><br />
<a rel="nofollow" href="https://datatables.net/forums/discussion/71488/issue-with-datatables-date-range-filter">https://datatables.net/forums/discussion/71488/issue-with-datatables-date-range-filter</a></p>

<p>There are additional steps needed when using moment.  What are the recommended ways to combine comparing moment objects with DateTime objects?</p>

<p>This one suggests there is some inconsistency with returning the time.<br />
<a rel="nofollow" href="https://datatables.net/forums/discussion/73126/issue-with-datatables-datetime-value#latest">https://datatables.net/forums/discussion/73126/issue-with-datatables-datetime-value#latest</a></p>

<p>The request is to either provide a way to just create a date only DateTime object or provide documentation and examples of how this works to eliminate confusion with just the <a rel="nofollow" href="https://datatables.net/extensions/datetime/examples/integration/datatables.html">generic example</a>.</p>

<p>Kevin</p>
]]>
        </description>
    </item>
    <item>
        <title>Input not valid for inline and native modal editing datetime</title>
        <link>https://next.datatables.net/forums/discussion/72900/input-not-valid-for-inline-and-native-modal-editing-datetime</link>
        <pubDate>Sun, 29 May 2022 05:40:30 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>Skrocki</dc:creator>
        <guid isPermaLink="false">72900@/forums/discussions</guid>
        <description><![CDATA[<p>I've been confused about this for weeks and ignored it because I have my own editing page which worked fine, using the jQuery datetime picker.  I guess this would be a good time to say I also can't get that date-time picker to work in place of he datatable version you guys developed. Yours is excellent too, but I haven't been able to get yours to work independently on the pages that I've created from scratch.</p>

<p>But that is not my biggest concern today. I'm having a problem with the jQuery datetime picker on my a custom built pages, so I thought I would tried you work around and get the inline picker working. Now I've spent hours on it this evening and looked up all kinds of examples and comments and replies from the forums but I just cannot get it to work. No matter what combination of formatting or what order anything is in, I get the 'Input not Valid' error every single time.</p>

<p>I can direct you to my sandbox with fictional data and you can replicate the issue using the 'Inspection' column. Can anyone help me know what I'[m doing fundamentally wrong so this datetime picker packaged with DataTables doesn't work anywhere at any time?  It is of Interest at the date only Fields work just fine, it's only the datetime fields that I'm having a problem with.</p>

<p>Thanks, Steve</p>

<p><a rel="nofollow" href="https://sandbox.claimpenguin.com/public/dataTable/claimtracker.php" title="https://sandbox.claimpenguin.com/public/dataTable/claimtracker.php"></a><a rel="nofollow" href="https://sandbox.claimpenguin.com/public/dataTable/claimtracker.php">https://sandbox.claimpenguin.com/public/dataTable/claimtracker.php</a></p>
]]>
        </description>
    </item>
    <item>
        <title>the order columns datetime  in iphone don't works, but in android  or pc is fine</title>
        <link>https://next.datatables.net/forums/discussion/72312/the-order-columns-datetime-in-iphone-dont-works-but-in-android-or-pc-is-fine</link>
        <pubDate>Thu, 07 Apr 2022 16:25:03 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>jjcfidalgo@gmail.com</dc:creator>
        <guid isPermaLink="false">72312@/forums/discussions</guid>
        <description><![CDATA[<p>in asp.net project i use datatables<br />
  &lt;link rel="stylesheet" type="text/css" href="<a rel="nofollow" href="https://cdn.datatables.net/v/bs5/dt-1.11.5/af-2.3.7/b-2.2.2/b-colvis-2.2.2/date-1.1.2/fc-4.0.2/fh-3.2.2/sc-2.0.5/sl-1.3.4/datatables.min.css">https://cdn.datatables.net/v/bs5/dt-1.11.5/af-2.3.7/b-2.2.2/b-colvis-2.2.2/date-1.1.2/fc-4.0.2/fh-3.2.2/sc-2.0.5/sl-1.3.4/datatables.min.css</a>"/&gt;<br />
    &lt;script type="text/javascript" src="<a rel="nofollow" href="https://cdn.datatables.net/v/bs5/dt-1.11.5/af-2.3.7/b-2.2.2/b-colvis-2.2.2/date-1.1.2/fc-4.0.2/fh-3.2.2/sc-2.0.5/sl-1.3.4/datatables.min.js">https://cdn.datatables.net/v/bs5/dt-1.11.5/af-2.3.7/b-2.2.2/b-colvis-2.2.2/date-1.1.2/fc-4.0.2/fh-3.2.2/sc-2.0.5/sl-1.3.4/datatables.min.js</a>"&gt;&lt;/script&gt;</p>

<pre><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-daterangepicker/3.0.0/moment.js"&gt;&lt;/script&gt;
&lt;script src="https://cdn.datatables.net/plug-ins/1.11.5/sorting/datetime-moment.js"&gt;&lt;/script&gt; 
$.fn.dataTable.moment('DD/MM/YYYY');
                              $('#&lt;%= Grid.ClientID %&gt;').dataTable(
                                  {
                                      "columns": [
                                          { "width": "10%" },
                                          { "width": "20%" },
                                          { "width": "10%" },
                                          { "width": "3%" },
                                          { "width": "3%" },
                                          { "width": "3%" },
                                          null
                                      ],
                                      "scrollX": true,
                                      responsive: true,
                                      "order": [[2, "desc"], [3, "desc"]]

                                  }

                              );


                              var table = $('#&lt;%= Grid.ClientID %&gt;').dataTable();
</code></pre>

<p>works fine  using chrome  in the android and pc but in iphone the ordering does not appear the same</p>
]]>
        </description>
    </item>
    <item>
        <title>Due date day-2</title>
        <link>https://next.datatables.net/forums/discussion/71983/due-date-day-2</link>
        <pubDate>Wed, 09 Mar 2022 14:42:27 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>wass_wass</dc:creator>
        <guid isPermaLink="false">71983@/forums/discussions</guid>
        <description><![CDATA[<p>Hello everybody,<br />
I would like to put a color on dates whose term arrives in 2 days.<br />
Here is what I did for a date greater than today's date.</p>

<p>rowCallback: function (row, data, index) {</p>

<pre><code>            if (data[6] &lt; moment().format('DD/MM/YYYY')) {
                $(row).find('td:eq(6)').css('background-color', '#f0aaaa').css('font-weight', 'bold')
            }
        },
</code></pre>

<p>Thank's</p>
]]>
        </description>
    </item>
    <item>
        <title>how to combine date time filter and callback footer? i also got error</title>
        <link>https://next.datatables.net/forums/discussion/71822/how-to-combine-date-time-filter-and-callback-footer-i-also-got-error</link>
        <pubDate>Thu, 24 Feb 2022 13:13:14 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>dika0094</dc:creator>
        <guid isPermaLink="false">71822@/forums/discussions</guid>
        <description><![CDATA[<p>i also got error<br />
DataTables warning: table id=example - Cannot reinitialise DataTable. For more information about this error, please see <a rel="nofollow" href="http://datatables.net/tn/3">http://datatables.net/tn/3</a></p>

<p>this is my code</p>

<pre><code>&lt;script type="text/javascript"&gt; 
   //fungsi untuk filtering data berdasarkan tanggal 
   var start_date;
   var end_date;
   var DateFilterFunction = (function (oSettings, aData, iDataIndex) {
      var dateStart = parseDateValue(start_date);
      var dateEnd = parseDateValue(end_date);
      //Kolom tanggal yang akan kita gunakan berada dalam urutan 2, karena dihitung mulai dari 0
      //nama depan = 0
      //nama belakang = 1
      //tanggal terdaftar =2
      var evalDate= parseDateValue(aData[2]);
        if ( ( isNaN( dateStart ) &amp;&amp; isNaN( dateEnd ) ) ||
             ( isNaN( dateStart ) &amp;&amp; evalDate &lt;= dateEnd ) ||
             ( dateStart &lt;= evalDate &amp;&amp; isNaN( dateEnd ) ) ||
             ( dateStart &lt;= evalDate &amp;&amp; evalDate &lt;= dateEnd ) )
        {
            return true;
        }
        return false;
  });

  // fungsi untuk converting format tanggal dd/mm/yyyy menjadi format tanggal javascript menggunakan zona aktubrowser
  function parseDateValue(rawDate) {
      var dateArray= rawDate.split("/");
      var parsedDate= new Date(dateArray[2], parseInt(dateArray[1])-1, dateArray[0]);  // -1 because months are from 0 to 11   
      return parsedDate;
  }    

  $( document ).ready(function() {
  //konfigurasi DataTable pada tabel dengan id example dan menambahkan  div class dateseacrhbox dengan dom untuk meletakkan inputan daterangepicker
   var $dTable = $('#example').DataTable({
    "dom": "&lt;'row'&lt;'col-sm-4'l&gt;&lt;'col-sm-5' &lt;'datesearchbox'&gt;&gt;&lt;'col-sm-3'f&gt;&gt;" +
      "&lt;'row'&lt;'col-sm-12'tr&gt;&gt;" +
      "&lt;'row'&lt;'col-sm-5'i&gt;&lt;'col-sm-7'p&gt;&gt;"
   });


   //menambahkan daterangepicker di dalam datatables
   $("div.datesearchbox").html('&lt;div class="input-group"&gt; &lt;div class="input-group-addon"&gt; &lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt; &lt;/div&gt;&lt;input type="text" class="form-control pull-right" id="datesearch" placeholder="Search by date range.."&gt; &lt;/div&gt;');

   document.getElementsByClassName("datesearchbox")[0].style.textAlign = "right";

   //konfigurasi daterangepicker pada input dengan id datesearch
   $('#datesearch').daterangepicker({
      autoUpdateInput: false
    });

   //menangani proses saat apply date range
    $('#datesearch').on('apply.daterangepicker', function(ev, picker) {
       $(this).val(picker.startDate.format('DD/MM/YYYY') + ' - ' + picker.endDate.format('DD/MM/YYYY'));
       start_date=picker.startDate.format('DD/MM/YYYY');
       end_date=picker.endDate.format('DD/MM/YYYY');
       $.fn.dataTableExt.afnFiltering.push(DateFilterFunction);
       $dTable.draw();
    });

    $('#datesearch').on('cancel.daterangepicker', function(ev, picker) {
      $(this).val('');
      start_date='';
      end_date='';
      $.fn.dataTable.ext.search.splice($.fn.dataTable.ext.search.indexOf(DateFilterFunction, 1));
      $dTable.draw();
    });
  });

  
&lt;/script&gt;
  &lt;script&gt;
        $(document).ready(function() {
    $('#example').DataTable( {
        "footerCallback": function ( row, data, start, end, display ) {
            var api = this.api();
 
            // Remove the formatting to get integer data for summation
            var intVal = function ( i ) {
                return typeof i === 'string' ?
                    i.replace(/[\$,]/g, '')*1 :
                    typeof i === 'number' ?
                        i : 0;
            };
 
            // Total over all pages
            total = api
                .column( 4 )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Total over this page
            pageTotal = api
                .column( 4, { page: 'current'} )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
                $(api.column(4).footer()).html(this.fnSettings().fnFormatNumber( 'Rp ' +pageTotal));
            // Update footer
            // $( api.column( 4 ).footer() ).html(
            //     'Rp '+pageTotal +' '
            // );
        }
    } );
} );
    &lt;/script&gt;

</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>How to switch the timezone of DateTime from UTC to other when using the date range filter</title>
        <link>https://next.datatables.net/forums/discussion/71365/how-to-switch-the-timezone-of-datetime-from-utc-to-other-when-using-the-date-range-filter</link>
        <pubDate>Tue, 25 Jan 2022 03:43:13 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>zhhm946</dc:creator>
        <guid isPermaLink="false">71365@/forums/discussions</guid>
        <description><![CDATA[<p>Hi All,<br />
I am new to frontend and Datatable. When I tried to use date range filter, the timezone of datetime shown in the calender is UTC, and I wanted that datetime to show in EST. Below are the figures, I have the datetime range work on the third column.<br />
As you can see, when datetime range started by 05:05, there are two entries displayed, which <strong>arrival time</strong> is 00:05 by EST and 05:05 by UTC. And when datetime range started by 05:06, two entries are no longer displayed. Can anyone tell me how to have date filter show the time in EST, instead of UTC?<br />
<img src="https://datatables.net/forums/uploads/editor/oj/efo6z1cjy0cm.png" alt="" title="" /><br />
<img src="https://datatables.net/forums/uploads/editor/4o/ihfz05zp0nhh.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>How to keep the date from a datetime column in MySQL and modify the time only?</title>
        <link>https://next.datatables.net/forums/discussion/69449/how-to-keep-the-date-from-a-datetime-column-in-mysql-and-modify-the-time-only</link>
        <pubDate>Wed, 18 Aug 2021 13:09:15 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>SEI-Nikki</dc:creator>
        <guid isPermaLink="false">69449@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Description of problem:</strong> I am creating a timeclock system for our employees. They are able to go back to their weekly clock in and out records and change the clock in and out times of the previous records.</p>

<p>There is error checking done to ensure their times do not conflict with other records of that one particular date. For example, if there is a record on a Monday from 7AM - 12:00PM and the next is 12:30PM-3:30PM, the second record could not have a clock in time changed to 11:30AM.</p>

<p>These times must be validated by the original date of the record. I have three columns for each record that are relevant - a date column for the date of the record, a timestamp clock in time, and a datetime clock out time. The issues I have found are as follows:</p>

<p><strong>First rendition:</strong> I tried to use just time on the two clock columns, but when submitting a change, the date portion of the datetime column updated to today's date instead of staying the same date with the new time. This is an issue because it changed the table to having all modified records be a part of today's time clock records, leaving the error checking to return a consistent response of "Dates must be the same". When I tried to use the error checking stored procedure to verify the difference in dates, there was no consistency as to when the date field would also update to today's date. I tried to disable the date column to ensure this would not change, but that leaves the user with the clunkiness of having to enter the date of the clock in and out columns twice.</p>

<p><strong>Second rendition:</strong> I changed the datetime fields to being both date and time, which is redundant because these records have to be in the same day but the day is rarely today's date. To try to mend this, I tried to use SET_EDIT on the serverside, but could not figure out how to default the values to the original date (and perhaps I missed something and could use the date column?).</p>

<p><strong>Current code (as seen in the images):</strong></p>

<p><strong>Fields from Editor:</strong></p>

<pre><code>fields: [ 
      {
        label: "Date:",
        name: "clock_in.clock_date",
        type: "datetime",
        format: "MMMM D, YYYY",
        wireFormat: "YYYY-MM-DD"
      },
      {
        label: 'Job:',
        name:  'clock_in.job_no',
        type: "select"
      }, {
        label: 'In:',
        name:  'clock_in.clock_in_time',
        type: "datetime",
        format: "MMMM D, YYYY h:mm A",
        wireFormat: "YYYY-MM-DD HH:mm:ss"
      }, {
        label:  'Out:',
        name:   'clock_in.clock_out_time',
        type:   'datetime',
        format: "MMMM D, YYYY h:mm A",
        wireFormat: "YYYY-MM-DD HH:mm:ss"
      }
      ]
</code></pre>

<p><strong>Error Checking via Editor</strong> - this runs a stored procedure to return a validation code so records do not overlap:</p>

<pre><code> editor.on("preSubmit", function(e, o, action) {
      if (submitFlag === false) {
        //if (action == 'edit') {
          //var rowid = data.DT_RowId;
          rowid = this.ids()[0];
          rowdate = this.field('clock_in.clock_date').val();
          newin = this.field('clock_in.clock_in_time').val();
          newout = this.field('clock_in.clock_out_time').val();
          newjob = this.field('clock_in.job_no').val();
          responseValidation(rowid, rowdate, newin, newout, newjob);
          return false;
        }
        submitFlag = false;
      });
      
      function responseValidation(rowid, rowdate, cin, cout, job) {
        $.ajax({
          url: "/timeclock/include/updateRecord.php",
          type: "POST",
          data: {
            rowid: rowid,
            rowdate: rowdate,
            newin: newin,
            newout: newout,
            newjob: newjob
          },
          success: function(response) {
            if (response == "1") {
              editor.field('clock_in.clock_out_time').error("Clock in time must be less than the clock out time.");
              submitFlag = false;
            } else if (response == "2") {
              editor.field('clock_in.clock_in_time').error("Clock in time conflicts with another record.");
              submitFlag = false;
            } else if (response == "3") {
              editor.field('clock_in.clock_out_time').error("Clock out time conflicts with another record.");
              submitFlag = false;
            } else if (response == "4") {
              editor.field('clock_in.clock_in_time').error("Clock in time conflicts with another record.");
              editor.field('clock_in.clock_out_time').error("Clock out time conflicts with another record.");
              submitFlag = false;
            } else if (response == "5") {
              editor.field('clock_in.clock_out_time').error("Time clock records must occur within the same day.");
              submitFlag = false;
            } else if (response == "6") {
              editor.field('clock_in.clock_in_time').error("Clock in time is required.");
              submitFlag = false;
            } else if (response == "7") {
              editor.field('clock_in.clock_out_time').error("Clock out time is required.");
              submitFlag = false;
            } else {
              submitFlag = true;
              editor.submit();
            }
          }
        });
        
      }
</code></pre>

<p><strong>Table column definitions:</strong></p>

<pre><code> columns: [
          { data: "clock_in.clock_date",
            render: function(data, type, row) {
              return moment(data).format("MMMM D, YYYY");
            } },
            { data: "001_PROJTRK.projtrk_bid_no", editField: "clock_in.job_no" },
            { data: "clock_in.clock_in_time", 
              render: function(data, type, row) {
                return moment(data).format("h:mm A");
              } },
              { data: "clock_in.clock_out_time", 
                render: function(data, type, row) {
                  return moment(data).format("h:mm A");
                } },
                { data: "clock_in.time_worked" }
              ],
</code></pre>

<p><strong>Controller:</strong></p>

<pre><code>-&gt;field( 
    Field::inst( 'clock_in.clock_date' )
    -&gt;validator( Validate::dateFormat(
        'Y-m-d',
        ValidateOptions::inst()
            -&gt;allowEmpty( false )
    ) )
    -&gt;getFormatter( Format::datetime( 'Y-m-d', 'Y-m-d' ) )
    -&gt;setFormatter( Format::datetime( 'Y-m-d', 'Y-m-d' ) ),
    Field::inst( 'clock_in.clock_in_time' )
    -&gt;validator( Validate::dateFormat(
        'Y-m-d H:i:s',
        ValidateOptions::inst()
            -&gt;allowEmpty( false )
    ) )
    -&gt;getFormatter( Format::datetime( 'Y-m-d H:i:s', 'Y-m-d H:i:s' ) )
    -&gt;setFormatter( Format::datetime( 'Y-m-d H:i:s', 'Y-m-d H:i:s' ) ),
    Field::inst( 'clock_in.clock_out_time' )
    -&gt;validator( Validate::dateFormat(
        'Y-m-d H:i:s',
        ValidateOptions::inst()
            -&gt;allowEmpty( false )
    ) )
    -&gt;getFormatter( Format::datetime( 'Y-m-d H:i:s', 'Y-m-d H:i:s' ) )
    -&gt;setFormatter( Format::datetime( 'Y-m-d H:i:s', 'Y-m-d H:i:s' ) ),
</code></pre>

<p><strong>Related question to this table:</strong> Is there a way to use RowGrouping without actually showing the column? For instance, instead of having a column in the table for the date, simply group by the date and order by the time columns?</p>
]]>
        </description>
    </item>
    <item>
        <title>Ordering by Date Time not working</title>
        <link>https://next.datatables.net/forums/discussion/71131/ordering-by-date-time-not-working</link>
        <pubDate>Mon, 03 Jan 2022 17:40:14 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>JabaHPU</dc:creator>
        <guid isPermaLink="false">71131@/forums/discussions</guid>
        <description><![CDATA[<p>I can't get the DateTime column on my table to order correctly.  It seems to be ordering by string values.  The data for my table is coming from a query of an oracle database.  The DateTime column returned from the query is of DateTime type and is in this format "2021-12-17 17:55:18.000".  This table is within a Django project and works perfectly other than this one column.  It displays like this "Dec. 18, 2021, 9:38 a.m." when the table is rendered in the browser.  I am using the responsive javascript setup:</p>

<pre><code>    $(document).ready(function () {
        var table = $('#table').DataTable({
            responsive: true
        });
        new $.fn.dataTable.FixedHeader(table);
    });
</code></pre>

<p>I've seen where you can set data-order to a timestamp, but since this data is coming from a query and is dynamic I'm having issues finding a solution.</p>
]]>
        </description>
    </item>
    <item>
        <title>DateTime Previous/Next Buttons</title>
        <link>https://next.datatables.net/forums/discussion/70647/datetime-previous-next-buttons</link>
        <pubDate>Tue, 16 Nov 2021 15:14:40 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>jeremydb85</dc:creator>
        <guid isPermaLink="false">70647@/forums/discussions</guid>
        <description><![CDATA[<p>I'm using a DataTables DateTime control in a form on my site. Everything works great except the Previous &amp; Next month buttons trigger a form submit since their button type attribute isn't set to "button". So they behave like type="submit" buttons.</p>

<p>I've found a couple workarounds, such as checking event.originalEvent.submitter.id in the submit event handler for my form, and calling preventDefault / returning false. However, I think it would make more sense for those buttons to simply be defined as "button" type. I realize this is probably a lower priority request but I wanted to get it out there in case anyone else has experienced a similar issue.</p>
]]>
        </description>
    </item>
    <item>
        <title>Is it possible to use the built-in Datetime picker outside of a Datatable</title>
        <link>https://next.datatables.net/forums/discussion/70394/is-it-possible-to-use-the-built-in-datetime-picker-outside-of-a-datatable</link>
        <pubDate>Tue, 26 Oct 2021 15:01:58 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>kerrjon</dc:creator>
        <guid isPermaLink="false">70394@/forums/discussions</guid>
        <description><![CDATA[<p>I love the look of the datetime picker within the custom search builder.</p>

<p><img src="https://www.datatables.net/forums/uploads/editor/e9/8d6xq92zlqbm.png" alt="" title="" /></p>

<p>I would like to use this same datetime picker throughout my site to keep the same theme for users.  Is it possible to wire the built-in datetime picker to a standard input that is not within a DataTable?  If so, how can that be done?  If no, is there a 3rd party library that closely matches the time picker functionality?</p>

<p>&lt;link rel="stylesheet" type="text/css" href="<a rel="nofollow" href="https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.11.3/b-2.0.1/b-colvis-2.0.1/b-html5-2.0.1/b-print-2.0.1/date-1.1.1/fh-3.2.0/r-2.2.9/sb-1.2.2/sp-1.4.0/sl-1.3.3/datatables.min.css">https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.11.3/b-2.0.1/b-colvis-2.0.1/b-html5-2.0.1/b-print-2.0.1/date-1.1.1/fh-3.2.0/r-2.2.9/sb-1.2.2/sp-1.4.0/sl-1.3.3/datatables.min.css</a>" /&gt;</p>



<p><br />
</p>

<p>&lt;input class="form-control dtsb-value dtsb-input" autocomplete="off"&gt;</p>
]]>
        </description>
    </item>
    <item>
        <title>SQL error on a column that doesn't exist in the table</title>
        <link>https://next.datatables.net/forums/discussion/70367/sql-error-on-a-column-that-doesnt-exist-in-the-table</link>
        <pubDate>Sun, 24 Oct 2021 20:53:56 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>jimomak</dc:creator>
        <guid isPermaLink="false">70367@/forums/discussions</guid>
        <description><![CDATA[<p>error "An SQL error occurred: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column users.vendors.Id at row 1</p>

<p>This is a odd error, as the database does not have a column with a datetime format, nor do any of the php files in use. table.vendors.php does not have a datetime field, nor the html headers, nor table.vendors.js . I've rebooted, cleared the cache, checked the files, yet this error persists. I generated the first table 'users' which had a datatime field. I then copied theses files, changed the fields, generated the table properly, and it all renders. Everything works accept 'CREATE' which throws this error.<br />
Does anyone have an idea?</p>
]]>
        </description>
    </item>
    <item>
        <title>Datetime format sorting problem</title>
        <link>https://next.datatables.net/forums/discussion/70271/datetime-format-sorting-problem</link>
        <pubDate>Fri, 15 Oct 2021 11:46:29 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>emresmsk</dc:creator>
        <guid isPermaLink="false">70271@/forums/discussions</guid>
        <description><![CDATA[<p><img src="https://datatables.net/forums/uploads/editor/fz/be9vltlalboz.png" alt="" title="" /></p>

<p>Hello, I want to format the Date column. (DD.MM.YYYY HH:mm ) I also get an error in the order. Sorting does not work in this format.</p>
]]>
        </description>
    </item>
    <item>
        <title>How can i change start of week?</title>
        <link>https://next.datatables.net/forums/discussion/69903/how-can-i-change-start-of-week</link>
        <pubDate>Sun, 19 Sep 2021 06:55:48 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>casuist</dc:creator>
        <guid isPermaLink="false">69903@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:</p>

<p>How can I change the start of the week?<br />
The default is on Monday.<br />
I want to change it to "Sunday".<br />
Please Help me...</p>
]]>
        </description>
    </item>
    <item>
        <title>Individual column searching issue  with format date Moment</title>
        <link>https://next.datatables.net/forums/discussion/68118/individual-column-searching-issue-with-format-date-moment</link>
        <pubDate>Wed, 28 Apr 2021 12:58:52 +0000</pubDate>
        <category>DateTime</category>
        <dc:creator>aurelien40</dc:creator>
        <guid isPermaLink="false">68118@/forums/discussions</guid>
        <description><![CDATA[<p>Hello,</p>

<p>I'm stuck on the individual column searching for a few days.. I succeeded to change display date format with the moment library but it doesn't apply to the search box. It still expected a date like "YYYY-MM-DD".</p>

<p>This my code :</p>

<pre><code>        var tableCheck = $('#histo').DataTable({
            scrollX: true,
            "sScrollY": "120em",
            "sScrollX": "100%",
            "bScrollCollapse": true,
            initComplete: function() {
                $('div.dataTables_scrollHeadInner thead tr#filterCheckHisto [name="filter"]').each(function() {
                    $(this).html('&lt;input id="input' + $(this).index() + '" type="text" class="form-control" placeholder="' + $(this).text() + '" /&gt;');
                    $(this).on('keyup change', function() {
                        var val;
                        val = $('#input' + $(this).index()).val();

                        var title = $(this).text();
                        console.log('titre =' + title);

                        console.log('laa');
                        tableCheck
                            .column($(this).attr("data-num"))
                            .column($(this).index()).search(val)
                            .draw();

                    });
                });
            },

            orderCellsTop: true,
            fixedHeader: true,

            dom: 'Blfrtip',
            "searching": true,
            "processing": true,
            "serverSide": true,
            "ajax": "../server_side/scripts/server_processing_tb_check.php",

            "order": [7, "desc"],


            "columnDefs": [{
                    targets: '_all',
                    defaultContent: '-'
                },
                {
                    "targets": 5,
                    "type": "date-euro",
                    "render": function(data, type, row, meta) {
                         return moment(data).format('DD-MM-YYYY HH:mm');               
                    }
                }
            ],

            "pageLength": 25,

        });
</code></pre>

<p>Basically, I'd like to add a "data-order" on &lt;td&gt; but I don't know how can I figure out.</p>

<p>Thanks in advance for your help</p>
]]>
        </description>
    </item>
   </channel>
</rss>
