datetime picker

154 views
Skip to first unread message

bruce

unread,
Oct 27, 2011, 11:17:26 PM10/27/11
to Netzke
Is it possible to have a datetime picker for datetime fields.
For example I want to have an appointment field which is datetime
format and want to be able to pick a date and time as opposed to just
picking a date.

Thanks,
Bruce

NomadCoder

unread,
Oct 28, 2011, 3:43:08 AM10/28/11
to net...@googlegroups.com
In Ext 3 times I've been using this: https://github.com/apleshkov/DateTimePicker But it's not working with Ext 4. I'll ping the author of it again (he was planning to update it a while ago), and see what the results are.

--
@nomadcoder
author of Netzke

--
You received this message because you are subscribed to the Google Groups "Netzke" group.
To post to this group, send email to net...@googlegroups.com.
To unsubscribe from this group, send email to netzke+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/netzke?hl=en.

bruce

unread,
Dec 1, 2011, 10:37:06 PM12/1/11
to Netzke
Sergi,
Sorry to bug you on this, but have you had a chance to look into this
further.
Thanks,
Bruce

On Oct 28, 6:43 pm, NomadCoder <nmco...@gmail.com> wrote:
> In Ext 3 times I've been using this:https://github.com/apleshkov/DateTimePickerBut it's not working with Ext 4. I'll ping the author of it again (he was planning to update it a while ago), and see what the results are.


>
> --
> @nomadcoder
> author of Netzke
>
> On Friday 28 October 2011 at 06:17, bruce wrote:
>
>
>
>
>
>
>
> > Is it possible to have a datetime picker for datetime fields.
> > For example I want to have an appointment field which is datetime
> > format and want to be able to pick a date and time as opposed to just
> > picking a date.
>
> > Thanks,
> > Bruce
>
> > --
> > You received this message because you are subscribed to the Google Groups "Netzke" group.

> > To post to this group, send email to net...@googlegroups.com (mailto:net...@googlegroups.com).
> > To unsubscribe from this group, send email to netzke+un...@googlegroups.com (mailto:netzke+un...@googlegroups.com).

NomadCoder

unread,
Dec 1, 2011, 11:13:58 PM12/1/11
to net...@googlegroups.com
Bruce,

Thanks for reminding me about this!

The author sent me the link to the updated datetimepicker, but I haven't yet had a chance to integrate it: https://github.com/apleshkov/DateTimePicker/tree/ext4

Currently I'm very busy with some urgent stuff, but I'm making a note for myself to do it asap.

If you decide to try it out yourself (shouldn't be too hard), that'd be helpful (in which case let me know you started on this).

--
@nomadcoder
author of @netzke

To post to this group, send email to net...@googlegroups.com.
To unsubscribe from this group, send email to netzke+un...@googlegroups.com.

bruce

unread,
Jan 14, 2012, 11:23:36 PM1/14/12
to Netzke
Well I am still missing something
I tried the following
https://github.com/apleshkov/DateTimePicker/tree/ext4
INSTALLATION

Open the build directory
Download files from that directory
Include date-time-ux.js and date-time-ux.css in your project
Copied files to vendor/gems/netzke-basepack/javascripts/
datetimefield.js
and vendor/gems/netzke-basepack/stylesheets/datetimefield.css

in vendor/gems/netzke-basepack/lib/netzke/basepack.rb
def init
Netzke::Core.ext_javascripts << "#{File.dirname(__FILE__)}/../../
javascripts/datetimefield.js"
Netzke::Core.ext_javascripts << "#{File.dirname(__FILE__)}/../../
javascripts/basepack.js"

Netzke::Core.ext_stylesheets << "#{File.dirname(__FILE__)}/../../
stylesheets/datetimefield.css"
Netzke::Core.ext_stylesheets << "#{File.dirname(__FILE__)}/../../
stylesheets/basepack.css"
end

in vendor/gems/netzke-basepack/lib/netzke/basepack/formpanel/fields.rb

def attr_type_to_xtype_map
{
:integer => :numberfield,
:boolean => :checkboxfield,
:date => :datefield,
# WIP: waiting for datetime.js implementation for ExtJS
4
:datetime => :datetimefield,
# :datetime => :datefield,

:text => :textarea,
:json => :jsonfield,
:string => :textfield
}
end

in vendor/gems/netzke-basepack/lib/netzke/basepack/grid_panel/
columns.rb
def attr_type_to_editor_xtype_map
{
:integer => :numberfield,
:boolean => :checkbox,
:date => :datefield,
# :datetime => :datetimefield, WIP: waiting for Ext 4 fix
:datetime => :datetimefield
# :datetime => :datefield,
:text => :textarea,
:string => :textfield
}
end

def attr_type_to_xtype_map
{
# :integer => :numbercolumn, # don't like the default formatter
:boolean => :checkcolumn,
:date => :datecolumn,
# :datetime => :datecolumn # TODO: replace with datetimepicker
:datetime => :datetimepicker # TODO: replace with datetimepicker
}
end

debugging Firefox
namespace is undefined
http://localhost:3000/extjs/ext-all-debug.js?1308057804
Line 3487

debugging with Chrome Browser
Uncaught TypeError: Cannot call method 'substring' of undefined
ext-all-debug.js line 3487
if (namespace === from || namespace.substring(0, from.length) ===
from) {


On Dec 2 2011, 3:13 pm, NomadCoder <nmco...@gmail.com> wrote:
> Bruce,
>
> Thanks for reminding me about this!
>
> The author sent me the link to the updated datetimepicker, but I haven't yet had a chance to integrate it:https://github.com/apleshkov/DateTimePicker/tree/ext4
>
> Currently I'm very busy with some urgent stuff, but I'm making a note for myself to do it asap.
>
> If you decide to try it out yourself (shouldn't be too hard), that'd be helpful (in which case let me know you started on this).
>
> --
> @nomadcoder
> author of @netzke
>
> On Friday 2 December 2011 at 11:37, bruce wrote:
>
>
>
>
>
>
>
> > Sergi,
> > Sorry to bug you on this, but have you had a chance to look into this
> > further.
> > Thanks,
> > Bruce
>
> > On Oct 28, 6:43 pm, NomadCoder <nmco...@gmail.com (http://gmail.com)> wrote:
> > > In Ext 3 times I've been using this:https://github.com/apleshkov/DateTimePickerButit's not working with Ext 4. I'll ping the author of it again (he was planning to update it a while ago), and see what the results are.

NomadCoder

unread,
Jan 15, 2012, 2:07:31 AM1/15/12
to net...@googlegroups.com
I've just had a moment to test a simpler DateTime field from http://www.sencha.com/forum/showthread.php?134345-Ext.ux.form.field.DateTime, and it seems working, I'll push the commit to master later today.

bruce

unread,
Jan 16, 2012, 5:16:56 PM1/16/12
to Netzke
Thanks Sergi. Have you had a chance to commit the change yet?

On Jan 15, 6:07 pm, NomadCoder <nmco...@gmail.com> wrote:
> I've just had a moment to test a simpler DateTime field fromhttp://www.sencha.com/forum/showthread.php?134345-Ext.ux.form.field.D..., and it seems working, I'll push the commit to master later today.

NomadCoder

unread,
Jan 17, 2012, 12:12:07 PM1/17/12
to net...@googlegroups.com
Sorry, it took longer than I thought, and I'm still not quite done - there's something I yet have to figure out about the default format of date and datetime values in date columns in grids. I just pushed the current results to master nevertheless, it should be usable.

--
@nomadcoder
author of @netzke

--
You received this message because you are subscribed to the Google Groups "Netzke" group.
To post to this group, send email to net...@googlegroups.com.
To unsubscribe from this group, send email to netzke+un...@googlegroups.com.

Bruce Davison

unread,
Jan 17, 2012, 1:10:41 PM1/17/12
to net...@googlegroups.com
I just downloaded https://github.com/skozlov/netzke-basepack/commit/7acdfbbe43b773d2090892d9a5b5baef1789bed9
But when I edit in form for a datetime field it seems to be using just the normal date picker?
Thanks,
Bruce

bruce

unread,
Jan 17, 2012, 7:02:44 PM1/17/12
to Netzke
OOPS my gemfile wasn't pointing to source in vendor.
It now works.
Thanks heaps
Bruce

On Jan 18, 5:10 am, Bruce Davison <bruce.au....@gmail.com> wrote:
> I just downloadedhttps://github.com/skozlov/netzke-basepack/commit/7acdfbbe43b773d2090...
> But when I edit in form for a datetime field it seems to be using just the normal date picker?
> Thanks,
> Bruce
> On 18/01/2012, at 4:12 AM, NomadCoder wrote:
>
>
>
>
>
>
>
> > Sorry, it took longer than I thought, and I'm still not quite done - there's something I yet have to figure out about the default format of date and datetime values in date columns in grids. I just pushed the current results to master nevertheless, it should be usable.
>
> > --
> > @nomadcoder
> > author of @netzke
>
> > On Tuesday 17 January 2012 at 05:16, bruce wrote:
>
> >> Thanks Sergi. Have you had a chance to commit the change yet?
>
> >> On Jan 15, 6:07 pm, NomadCoder <nmco...@gmail.com> wrote:
> >>> I've just had a moment to test a simpler DateTime field fromhttp://www.sencha.com/forum/showthread.php?134345-Ext.ux.form.field.D..., and it seems working, I'll push the commit to master later today.
>
> >>> --
> >>> @nomadcoder
> >>> author of @netzke
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "Netzke" group.
> >> To post to this group, send email to net...@googlegroups.com.
> >> To unsubscribe from this group, send email to netzke+un...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/netzke?hl=en.
Reply all
Reply to author
Forward
0 new messages