jQuery UI Widgets › Forums › Editors › DateTimeInput › Date not showing after parent DIV is hidden then visible
Tagged: date picker, datetimepicker, jquery datetimepicker
This topic contains 3 replies, has 3 voices, and was last updated by Peter Stoev 10 years, 7 months ago.
-
Author
-
Hi Team,
I create a Date Time inside a DIV that is hidden on pageload but that is shown when the user clicks on a button. But when I show the parent DIV, the date does not appear and behaves strangely. I even tried to empty the parent DIV and recreate it when the user clicks on the button, but no change.
I even tried this :$(‘#MyparentDIV’).show(300);
$(“#MyparentDIV”).empty();
$(“#MyparentDIV”).append(‘<div id=”myDateDIV”></div>’);
$(“#myDateDIV”).jqxDateTimeInput({ width: ‘100%’, height: ’25px’, formatString: ‘yyyy-MM-dd HH:mm:ss’ });No result.
Thanks
Hi mesken,
If you show the parent’s DIV without the animation i.e if you initialize jqxDateTimeInput from a visible DIV tag, then you won’t have any problem. The visible DIV tag is required for performing a correct layout. By visible, I mean with something different than display: none. It still can be visibility:hidden;. Another option is to call the widget’s “refresh” method once the “show” animation has finished.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I have tried refreshing the widget, when the “show” animation is complete. But the widget does not display.The Div is hidden by using hidden=”hidden”
Here is what I’m doing…am I missing something?
$(‘#liAddNote’).click(function () {
$(‘#divAddNote’).show(“slow”, function () {
$(“#txtNoteDate”).jqxDateTimeInput(‘refresh’);
});
$(‘#divItemsMenu’).hide();
$(‘#txtItemDescription’).val($(‘body’).data(‘item’));
});Hi Gopre400,
Sorry, but the provided code and information are not sufficient for testing your application scenario. Please, prepare a sample in http://jsfiddle.net/ and share it. As I already wrote here, a visible DIV tag is required for performing a layout. If your DIV tag is not visible, the widget would not be created.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.