i have 3 datebox fields one under another. When i open first calendar, its SET DATE button comes over the 3rd field. So when i tap on the SET DATE it also gets click on the 3rd field and its calendar opens up...
Right now i am doing this, but its not a good idea and also doesn't works in all browsers
if(passed.method === 'close'){ // If first field calendar close
setTimeout(function(){
$(3rd field calendar).datebox('enable');
$(3rd field calendar).blur();
$(3rd field calendar).datebox('close');
}, 500);
}
Kindly suggest
Related
I have a mobile app that consistently does not close the DatePicker if I go to another data entry field on iOS. I have to click "Done". In other words, I click on "date" field ( MDateBox ), then click on "number" field ( MDoubleBox ). "Number" field still has the date picker displayed in this case. I see this even happens with JQueryUI on iOS, but I don't know how to get around it in the MGWT context. Any help would be appreciated. Thanks.
Tony
Using jquery datepicker for change month and change year. While testing for accessibility, the tab is not working for the calendar, as in the calendar pops up on using tab, but after that it goes to the next field on using tab again.
Instead it should go to Previous button then Month Dropdown then year dropdown then Next button then all the dates.
Please share any solution if possible.
When the datepicker displays you'd have to get the UI element and change the tabindex properties of the child buttons accordingly.
edit This is actually more difficult, because you have to mess with the onfocus/onblur events as well.
The HTML5 DATE works with tabbing.
<input type="date" />
I need to react at TDateTimePicker.OnChangeEvent on date change. Display dialogs like "Unsaved changes will be lost" with buttons OK, Cancel. If the user press Cancel button I want to reset back the original date.
Unfortunatelly I can't change the date from that event. Change is ignored.
More detailed description:
User change the date in DateTimePicker (by keyboard) or Opens the calendar and pick a date
OnChange event is fired (calendar maybe still open)
I display the MessageDialog and if user press "Cancel" I want to restore date. Eg. close the calendar and restore date.
It is partially solved by user LU RD - see comments "Restore the value in the OnCloseUp event". It works for choosing date from a calendar.
If user change date directly in edit using keyboard it can be changed directly in onChangeEvent.
So combination of setting original (or any other date) in onCloseUp and onChange event is enough.
Jquery UI date picker loses focus when selecting a date. Are there any alternatives to this?
If not, how do I achieve the standard web bevaviour of user entering data into the input field and not losing focus while doing so.
I ended up using onselect function of the date picker
I have a calendar which is meant to look much like the calendar in Outlook. There is a big field representing the hours in a day, and there is a date navigator. The navigator is the jQuery UI Datepicker.
I want users to be able to navigate to a new day by clicking on a date in the datepicker, but also to be able to drag appointments over the datepicker and drop them on a specific date. I have that working now.
I also want users, while they are dragging an appointment, to be able to move to next or previous month simply by hovering over the datepicker. So I've added a mouseenter and mouseleave event: one runs a setInterval function which sends a click every 1,5 seconds; the other cancels the interval function.
This is where all sorts of things go wrong. As soon as one click has been triggered, the mouseleave function no longer works: in other words, the datepicker keeps flipping over to another month every 1,5 seconds.
It seems that the datePicker interferes, or that the click event causes other things to go wrong. What can I do?
It sounds like your event listeners are been overwritten by the jQuery-UI Datepicker states. It you look at the source of the date picker, every time it changes state it re-declares its event listeners. Thats all I can say without looking at your source.
Post your source and I'll try to fix it for you. It may be necessary to monkey patch the Datepicker.