jQWidgets Forums
jQuery UI Widgets › Forums › Editors › DateTimeInput › Restrict Date in jqxDateTimeInput
Tagged: datetime picker specialDates
This topic contains 9 replies, has 3 voices, and was last updated by Peter Stoev 11 years, 10 months ago.
-
Author
-
Hi Peter,
I am using a jqxgrid and have one column of date(columntype: ‘datetimeinput’). i want to enable only few days in datetimeinput box.
Please let me know how we can achieve this.
Thanks in Advance.
Regards,
Abdul
I have tried in both version of jqwidget i.e. 2.6 and 2.8. I need something like disable date as we have in jquery datepicker. Please let me know if this feature is available or not.Is there any workaround?
Also i found that some of the properties / method missing in API documentation like showCalendar for jqxDateTimeInput.
Regards,
AbdulHi Abdul,
We do not document the widget’s private API. We document the API which should be used by end users and developers. To open the calendar, use the “open” method. The following sample shows how to restrict a date: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatetimeinput/restrictdaterange.htm?classic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Thanks for your quick response.
Above example you have provided is restrict date range but i need to enable particular date. e.x. in this month(April 2013) i want to enable only the 12 April and 16 April. User can only select these two days.
Regards,
AbdulHi Abdul,
I am afraid that it is not possible to enable/disable selection of particular dates.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Again Thanks for your quick response.
Here is the code snippet for one of my column that i am using in my grid. I am making this column as datetimepicker in initeditor function.
{ text: ‘Management Start Date’, editable:true,datafield:’Management_Start_Date__c’ ,
initeditor: function (row, cellvalue, editor) {
editor.datepicker({dateFormat: ‘m/d/yy’});
///………………………………….. Other code area…….///Everythings work fine except if i select any date outside the grid area which gives following error. I will explain in more detail consider you have only one line in grid and when click on this column will popup the calendar and since grid have only one row than calendar height will be more than grid height. if i select any date that appears on the grid will work fine if i select any date outside the grid area gives following error. For your reference i have uploaded the image here. In this image if i select date from 21 to 30 will gives following error.
Uncaught Missing instance data for this datepicker.
Regards,
AbdulHi Abdul,
May be the reason is that datepicker is not a supported editor in jqxGrid. The editor that we use is called jqxDateTimeInput.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHI Peter ,
Thanks for all your help. I will look for some other workaround. Is there anything like special date in jqxDateTimeInput like we have in jqxCalendar?
Regards,
AbdulPeter:
I didn’t see an answer to the above question, so I thought I’d ask. In the calendar used for the jqxDateTimeInput, is there functionality similar to specialDates in jqxCalendar, so that input of specific dates can be limited or encouraged? Ranges don’t work when, for example, you want to limit input to certain days like school days, and would like to visually present valid days to the user. Any suggestions are always welcome. Thanks in advance!
-Doug
Hi Doug,
jqxDateTimeInput does not have API for adding special dates.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.