Skip to main content

Search and Top Navigation

#15269 new bug ()

Opened January 30, 2018 09:08AM UTC

Last modified November 01, 2018 03:28PM UTC

Small bug with - datepicker for dates range

Reported by: EGrozdev Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:
Description

After focusing 'from'* input element

1. Select 'from' date with date picker

2. Then manually delete 'from' content in input

At this stage date picker is in open status and 'from' date can be picked

3. Pick the date -> nothing happens as 'on change' event may be overrides ui behavior

4. If you pick the 'from' date again it will be appeared in 'to' date

  • it could be either 'from' or 'till' - both has above mentioned bug.

I personally solve the issue by unfocus input element and hiding date picker, but there should be default functionality I guess.

My solution (in CoffeeScript):

$("#date_from, #date_till").on 'keyup', (e) ->
   if e.which == 46 and this.value.length == 0
      this.blur()
      $("#" + this.id).datepicker('hide') 
Attachments (0)
Change History (3)

Changed January 31, 2018 08:26PM UTC by rjollos comment:1

description: After focusing 'from'* input element \ 1. Select 'from' date with date picker \ 2. Then manually delete 'from' content in input \ At this stage date picker is in open status and 'from' date can be picked \ 3. Pick the date -> nothing happens as 'on change' event may be overrides ui behavior \ 4. If you pick the 'from' date again it will be appeared in 'to' date \ * it could be either 'from' or 'till' - both has above mentioned bug. \ \ I personally solve the issue by unfocus input element and hiding date picker, but there should be default functionality I guess. \ \ My solution (in CoffeeScript): \ \ $("#date_from, #date_till").on 'keyup', (e) -> \ if e.which == 46 and this.value.length == 0 \ this.blur() \ $("#" + this.id).datepicker('hide') After focusing 'from'* input element \ 1. Select 'from' date with date picker \ 2. Then manually delete 'from' content in input \ At this stage date picker is in open status and 'from' date can be picked \ 3. Pick the date -> nothing happens as 'on change' event may be overrides ui behavior \ 4. If you pick the 'from' date again it will be appeared in 'to' date \ * it could be either 'from' or 'till' - both has above mentioned bug. \ \ I personally solve the issue by unfocus input element and hiding date picker, but there should be default functionality I guess. \ \ My solution (in CoffeeScript): \ \ {{{#!coffee \ $("#date_from, #date_till").on 'keyup', (e) -> \ if e.which == 46 and this.value.length == 0 \ this.blur() \ $("#" + this.id).datepicker('hide') \ }}}

Changed October 25, 2018 01:43PM UTC by scottgonzalez comment:2

component: ui.coreui.datepicker

Changed November 01, 2018 03:28PM UTC by rjollos comment:3

description: After focusing 'from'* input element \ 1. Select 'from' date with date picker \ 2. Then manually delete 'from' content in input \ At this stage date picker is in open status and 'from' date can be picked \ 3. Pick the date -> nothing happens as 'on change' event may be overrides ui behavior \ 4. If you pick the 'from' date again it will be appeared in 'to' date \ * it could be either 'from' or 'till' - both has above mentioned bug. \ \ I personally solve the issue by unfocus input element and hiding date picker, but there should be default functionality I guess. \ \ My solution (in CoffeeScript): \ \ {{{#!coffee \ $("#date_from, #date_till").on 'keyup', (e) -> \ if e.which == 46 and this.value.length == 0 \ this.blur() \ $("#" + this.id).datepicker('hide') \ }}}After focusing 'from'* input element \ 1. Select 'from' date with date picker \ 2. Then manually delete 'from' content in input \ At this stage date picker is in open status and 'from' date can be picked \ 3. Pick the date -> nothing happens as 'on change' event may be overrides ui behavior \ 4. If you pick the 'from' date again it will be appeared in 'to' date \ * it could be either 'from' or 'till' - both has above mentioned bug. \ \ I personally solve the issue by unfocus input element and hiding date picker, but there should be default functionality I guess. \ \ My solution (in CoffeeScript): \ \ {{{#!coffee \ $("#date_from, #date_till").on 'keyup', (e) -> \ if e.which == 46 and this.value.length == 0 \ this.blur() \ $("#" + this.id).datepicker('hide') \ }}}