I have a jqgrid with a Date column. I like to implement a filter option for the column with a datepicker on the column filter textbox.
I have already formatted the column to display the date values in specific format of d-M-y, using the formatoptions attribute.
I implemented the same using the datainit event with a datepicker for the column. But, filter is not working on selection of date using the datepicker.
I doubt, the format differences between the column value display and the datepicker of the column filter as the reason behind this.
Even though, after making both the formats same, filter does not work.
Any help is appreciated.
Thanks
Manikandan J
Related
Trying to add a filter to a gallery based on datepicker from a sql datasource. The date format is YYYY-mm-dd.
When I add a filter to the a SQL datasource gallery and I add a datepicker to allow me to filter the records on date. SQL displays the date as YYYY-MM-dd. Datepicker is showing date as MM\dd\YYYY. When I enter a date that I know I have data for, no data is display. I don't get an error in the formula.
Formula for Gallery.items:
Filter(
vw_Expenses,
Date = dp_ViewExpensesDateFilter.SelectedDate
)
Nothing is displayed. Is it because SQL displays dates as YYYY-MM-dd? If so, how do I fix this? If not, what is the recommended change to get the filter working on my gallery?
Check the data type on the SQL column. It could be text or DATE, etc.
The DatePicker control in PowerApps is of Date type:
Notice the , 12:00:00 AM appended
By rapping it in the Text() Function, you can change it to Text:
You need to match up the DataSource (SQL) and the PowerApps data types to get the Filter function to work.
I have this Telerik RadGrid with a date column filter, I'm not happy with the rage filter using 2 calendar datepickers, {edit} to much with or height for that column I have no intentions of validate or restrict dates. {end edit}. Is there a way of solving this with 1 calendar but still using Telerik controls?
The Best way to pick two date (From/To) is to have 2 DatePickers.
There is no logical work around to this, and it's "KISS" .
If you have one DatePickers.
That first fire select event get date "from" and second get date "to".
How can this be user friendly ?
If you enter 1rst date.
Then want to modify the 1rst date Without setting the 2nd date.
How will you do ?
The real question is why dont you want 2 Date picker ?
- Is it because it to big to display it nicely in the FilterBar?
- If it's a User need, try to improve the logic behind the DatePiker.
Perhaps the Date is not random ? And can be done with a RadSlider?
Or they select a date and get for range -3 / +3 range.
There is no simple solution, because what you need and what you want are not clear.
edit:
If you need to have 2 input text with only one single calendar icon, You will end with the same problem how do they chose witch input they wanna set the value in?
I hope this will help,
Regards,
Pierre
The best way for use only one date picker control is create own logic for this filter using one datapicker and something for display your range filter (label).
First fire select event get date "from" and second get date "to".
I'm facing a problem that I can't understand. I'm using Kendo Grid with InCell edit and I have a DateTime field in my Model.
When the grid enters in edit mode, the calendar is shown, but the grid only saves the inputed value if I select the value from the calendar. If I input the field manually, the value is not saved and the cell is not marked has dirty.
If it helps, I'm using MVC with Razor sintax.
Tks in advance!
I've found a workaround in Kendo's forums:
By design, the DatePicker does not raise the change event when the value is set programmatically - it raises only if the date is modified by the end-user. In case you need to trigger the change event, you can use jQuery trigger().
For example:
var datePicker = $("#datepicker").data("kendoDatePicker");
datePicker.value("01/01/2001");
datePicker.trigger("change");
Reference:
http://www.kendoui.com/forums/ui/date-time-pickers/datepicker-change-event.aspx
So basically what I did was to force the change event manually.
Is there a way to update formatter on a single cell of a column dynamically. I'm able to change the formatter for the entire column using
$(jQuery('#grid').jqGrid('setColProp', 'colName', {formatter: ''})).trigger('reloadGrid')
However when I use code below the grid refreshes but with no changes.
$(jQuery('#grid').jqGrid('setCell', j, 'colName', '','',{formatter: ''})).trigger('reloadGrid')
No, the formatter is for the whole column, not a single cell. If you need this level of granularity, you will need to use a custom formatter function with logic that can somehow detect that you are in that particular cell - such as by using the row object to get the row ID.
I need to show/hide columns in jqGrid and to filter grid results.
For hiding and showing I use global array on the page. It keeps state.
For searching and filtering I use build-in filter dialog.
For invisible columns I set property "search" for "false"(nobody wants to sort results if he doesn't see it) so...there is no such column in the filter list. But when I show any column that was hidden(I call $("#jqgrid").showCol(colName);) then this column doesn't appear in the filter list. Of course, I have to change column's "search" property. But how??? Is it possible?
Thanks in advance