View Full Version : DateTime Field Extension

18 Jul 2014, 4:36 PM
Hi guys,

I created a simple DateTime Field User Extension that I would like to share with you. This might be useful for someone who needs to work with Dates and Times and would like to avoid using Date Field and Time Field.

Here is the github repository in case you wanna clone from there and help fix bugs (feel free to create pull requests): https://github.com/gportela85/DateTimeField
UPDATE (Jun 22nd, 2015): Added compatibility with ExtJS 4.2.x, ExtJS 5.x and ExtJS 6
Fixed many bugs


20 Jul 2014, 5:22 PM

29 Jul 2014, 10:44 AM
I modified the logic a little bit so different DateTime formats like 'c' would work too.

New .aux version and screenshots available on GitHub.

21 Sep 2014, 8:38 PM
I have added support for ExtJS 5.0 and Sencha Architect 3.1. (Attached file to my first post has been replaced with the new version)

3 Oct 2014, 3:54 PM
hey, thanks so much for sharing this! I just wanted to add a note here: users will need to rename the download from DateTimeField.aux.zip to DateTimeField.aux in order to install this into Architect properly. OSX users take note: you may need to use Terminal to rename it instead of Finder, as Finder sometimes will just hide the extension visually, but keep it on the filesystem!

4 Oct 2014, 1:14 PM
Honestbleeps, thanks for adding this tip. I took this time now to upload the latest version here, that adds support to use the DateTimeField inside grid editors and fixed some bugs.

19 Feb 2015, 8:32 AM
the slider does not appear... I'm using Extjs 5.1.0... i don't know if i using this plugin wrong, but i'm only add de .js files in ext/src/ux/ folder, including the required files in my extjs form ... it's the correct way? seems that slider still there, but's not appear...

19 Feb 2015, 9:47 AM
One way is to add your files like this:

<link rel="stylesheet" href="../../Libraries/ext-5.1.0/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css (http://localhost/~guilherme/Libraries/ext-5.0.1/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css)" />
<script src="../../Libraries/ext-5.1.0/build/ext-all.js (http://localhost/~guilherme/Libraries/ext-5.0.1/build/ext-all.js)"></script>
<script src="DateTimePicker.js (http://localhost/~guilherme/Testing/DateTimeField5/DateTimePicker.js)"></script>
<script src="DateTimeField.js (http://localhost/~guilherme/Testing/DateTimeField5/DateTimeField.js)"></script>

<script src="app.js (http://localhost/~guilherme/Testing/DateTimeField5/app.js)"></script>

This should be enought to display the field when you add

name: 'DateTimeField',
launch : function() {
title: 'Testing',
border: false,
bodyPadding: 10,
width: 300,
height: 300,
items: [{
xtype: 'datetimefield',
fieldLabel : 'Label',
format : 'm/d/Y H:i'
renderTo: Ext.getBody()

I've added a fiddle with ExtJS 5.1: ii4

19 Feb 2015, 11:24 AM
something is wrong with my project... i've added a simple slider field in my form, and the slider not appear... i don't know if some problem occurs in my project, but I created the project again with sencha cmd, put all files in the project and the slider appears... BUT, the previous theme is crisp, and my actual (after create project again) theme is neptune... but in your example, the slider works fine... ... well, I think the problem must be me.

Sorry about that,:s and sorry about my english :))

Thanks in advance

19 Feb 2015, 11:26 AM
oh, and thank you, your plugin solve my problem!~o)

19 Feb 2015, 11:34 AM
I'm glad..don't forget to give it a star on github :)

23 Aug 2015, 11:42 PM
hi im using sencha.

I've successfully installed your extension and put it on my workspace. After saving and publishing, I double click the index.html and an error occured. No interface displayed on the screen

this is the error. can you guys help? :(

"NetworkError: 404 Not Found - http://cdn.sencha.com/ext/gpl/4.2.1/src/ux/DateTimePicker.js?_dc=1440401979831"

17 Sep 2015, 6:03 AM

4 Oct 2016, 12:45 AM
thanks this is very useful

8 Jul 2017, 10:28 AM
fantastic, thanks

26 Apr 2018, 6:35 AM
Thanks a lot!
Plugin works on 6.5.3