MVC.Grid Filter - Date Window/Calendar - asp.net-mvc

I'm using MVC.Grid to populate a table & everything is working nicely. However for the date column I would like to click on the filter icon & have a date window to select form instead of the standard equals/contains option. Anyone done this?
FYI - I'm also using bootstrap 3.1 & MVC 5.2.
screenshot of current column filter:

Have a look at this post. You need to add a library for datepicker and add the proper css to the code.
Date Picker

Related

YADCF Bootstrap Datetimepicker Overflowing from Container

I'm encountering an issue using the YADCF date filter for DataTables with the Bootstrap-Datetimepicker styling option. The issue is that the Months/Years/ are overflowing from the dropdown container. The weird part is that the actual date selection looks fine. I've included some screenshots below.
This is what the month selection looks like, the year selection looks the same way.
However, the date selection looks normal, like this:
I have other date picker drop downs throughout my app that look normal:
Initializing the date filter field as so:
yadcf.init(tableElement.DataTable(), [
{ column_number : 11,
filter_type: "range_date",
datepicker_type: 'bootstrap-datetimepicker',
date_format: 'YYYY-MM-DD',
filter_container_id: 'yadcfDateDiv'
}]);
I just can't seem to figure out what styling property is needed to resolve this. I've tried adjusting the padding/margins (as suggested in other posts I've found) of the months and such but it just makes them closer together, not below each other like the last screenshot. If anyone has any ideas it would be greatly appreciated.
Versions
YADCF: 0.9.4
DataTables: 1.10.16
Eonasdan/bootstrap-datetimepicker 4.7.14
After digging through the Eonasdan/bootstrap-datetimepicker documentation, I discovered that the DateTimePicker plugin has a WidgetParent option that can be used to set the parent element in which the widget will reside.
Since I am initializing the DateTimePicker plugin through YADCF and passing in a custom filter_container_id, I found that if I also passed that same element to the WidgetParent property it will display as intended.
I have added the following code to my DataTable initialization function for the page which has resolved this issue:
$('input[id^="#yadcf-filter--orders-datatable"]').data("DateTimePicker").options({
"widgetParent": '#yadcfDateDiv'
});
It selects both of the input fields that are generated by the YADCF plugin which the DateTimePicker objects are bound to and sets the appropriate parent element.
Hopefully this helps some future Googler.

Use Datepicker For a Date Field

I am using Grails 4. My book domain has a date field. I use <f:all bean="book"/> in my edit view to display the input fields. The Fields plugin displays 3 dropdown boxes with the day, month, and year in the html for the date field in the book.
Would you teach me how to display a Datepicker instead of popping up 3 dropdown boxes please?
Thanks!
My bad. I just review the bootstrap document. Bootstrap does not have any native datepicker. I should ask how to replace the grails datepicker with the jquery ui datepicker.

Struts2 create dropdown dymamically based on first dropdown value in Struts2 using hibernate

Hi I am using Struts2 and hibernate now in my jsp I have Two dropdown ,on selection of first drop it should call a function and retrive the values for second drop down from the database
Please help
Well you have number of options here and some of them are
user struts2-jquery plugin which comes with this feature where you can create two dependable select.
user simple jquery with JSON (struts2 plugin) and use ajax.
i will prefer second approach which is much more flexible.create a custom JS function with help from jquery and when use select first option from drop down call your action methods which will send JSON data based on the selected values and use JQuery build in JSON parsing mechanism to parse the content and fill second drop-down.
a simple Google search will give you a number of results.

datepicker not working with autocomplete symfony

I am working with a form in symfony in which I need to use both the autocomplete and the datepicker functionalities. For autocomplete I am using sfExtraWidgetFormInputAutocomplete and for datepicker I am using sfWidgetFormDateJQueryUI in my form configure() method. In my form first widget using autocomplete is rendered and then the datepicker widget. I have read that there is some compatibility issue with these two.
Please tell me how to make them both work in single form.
use this line on the top of the page:
jq_add_plugins_by_name(array('autocomplete'));

Make collection_select display as an image (Rails 3 App)

All,
BACKGROUND: I have a collection_select statement that displays a dropdown box.
OBJECTIVE: I'd like the dropdown to be an image that the user clicks to see the collection rather than the default box + down arrow that appears.
You need something like this plugin for jQuery. It allows you to replace a normal select with a custom one based on your wants. You would have to write your own select helper since you need to add the attributes to the select options that this plugin requires. If you get started and need help, post back here with what you're stuck on.

Resources