Results 1 to 6 of 6

Thread: DateField - I want to make format like "01.02.16 23:59:59"

Threaded View

Previous Post Previous Post   Next Post Next Post
    You found a bug! We've classified it as EXTGWT-4584 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2015
    Posts
    10

    Question DateField - I want to make format like "01.02.16 23:59:59"

    Hello!

    I use GWT version 2.7.0, GXT version 3.1.4.

    I use DateField, want after selecting a date using DatePicker time was "23:59:59"

    code snippet:

    Code:
    private final DateField perEnd;
    
    ...
    
    
    perEnd.getDatePicker().addValueChangeHandler(new ValueChangeHandler<Date>() {
        @Override
    public void onValueChange(final ValueChangeEvent<Date> event) {
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
    public void execute() {
                    Date victim = event.getValue();
                    if (victim != null){
                        victim.setHours(23);
                        victim.setMinutes(59);
                        victim.setSeconds(59);
                        perEnd.setValue(victim, true, true);
                        Info.display("debug", "fired, try set value " + victim +", now value " + perEnd.getCurrentValue());
                    }
                }
            });
        }
    });

    I'm doing something wrong - because the time is still "00:00:00"

    See attached file:

    screen.jpg


    I tried to rearrange the focus, using scheduleDeffered - unsuccessfully. Can you suggest how to make the time to be "23:59:59"?
    Last edited by kdtemnen; 15 Nov 2015 at 11:48 PM. Reason: gwt & gxt versions

Similar Threads

  1. Replies: 4
    Last Post: 27 Jan 2014, 3:04 AM
  2. datefield in format "m.Y"
    By PSB in forum Ext: Q&A
    Replies: 1
    Last Post: 31 Oct 2012, 4:20 AM
  3. Replies: 2
    Last Post: 3 Apr 2012, 8:15 AM
  4. [FIXED] Spaces in the "id" property make the "preview" non functional
    By boboka in forum Ext Designer: Bugs
    Replies: 1
    Last Post: 27 Oct 2011, 10:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •