i want to do a search of range date using quicksearch item, but until now i realize that in the class quicksearch is a line with this code :
$this->search_field=$this->addField('line','q','')->setNoSave();
the only thing i did is to change into this:
$this->search_field=$this->addField('DatePicker','a','Desde :')->setNoSave();
I just change "line" to "DatePicker", so simple i guess,now if i add a quick search to my manager page has 2 icons, one with the icon search and the other with icon calendar, so if i search a date, i just select the date and hit the icon search, and gets me the all the results with that date, tha´ts perfect, but what happen if I add 2 quicksearchs and try to do a range date search?? the only message i get is "No Records Found".
So the question is.. How do i do range date search? I realize that exists another line in the function postinit:
$or->where($field,'like','%'.$v.'%');
maybe it will work if i put another query?
$or->where($field>=$v) or something like that?? i have spend more than 3 days trying to do this range date search?
So if anyone has some corrections with this code i would be more than happy
Try this
$or->where(array(
array($field,'>=',$from_date),
array($field,'<=',$till_date),
));
Related
Using DayPickerRangeController from airbnb/react-dates (12.7.1), I would like to display the week number on the left of the day picker for each weeks.
Here is what I currently have
Here is what I would like to see on my calendar
Is there any prop that can help or is there an already existing solution?
airbnb/react-dates does not support any props to display the week no.
You can have a look at rc-calender as other alternative.
As mentionned by #ShridharBavannawa, there's currently no support for displaying week number. However, there's a related issue open on github where Jussi Niinikoski suggests a hack that help; Instead of displaying week number on the side of each week, one can display them in every date cell with the renderDayContents property as follow:
renderDayContents={(day) => (
<>
<p>{day.format('W')}</p>
<p>{day.format('D')}</p>
</>
)
Where day would be a momentJS object. You can then style the cell to your taste.
i am not sure if anyone ask this question before. I want to create a date filter like the one google is currently using in their search tools. In this filter, the user can filter a list item by past month, past week, and pass year.
I have an object stored in localStorage
Does any one have any ideas how to do it?. A plunker example would be nice. Thanks
I have an example from codepen
`http://codepen.io/PageOnline/pen/nCfAj`
I've searched for days and not found a clear answer for this.
I'd say I'm intermediate with Drupal (at best). I'm using Views, Panels, CCK, and the Date modules (among others, that may not relate to this question)
I've got a content type of Shows (plays), that has a date range field (from the date module) that is the run date of the show.
I've got 3 views blocks that I filter using the Content: Show Dates - start date and Content: Show Dates - end date fields. These display a list (links) to shows that are of 3 categories, now playing, upcoming, and past shows. They work fine.
Now for the tricky part (for me). I want Panels (Node rewrite for Shows) to decide which one to display in the sidebar while looking at a Content:Show based on whether it is currently running, yet to run, or in the past.
What are the steps to make this happen?
thanks!
jason
Edit: I'm working with Blocks too.
I would suggest to create 3 views (not necessary blocks if you have enabled the "Views content pane" module), one for each date option with a nid as Contextual filter and a display of Content:Node. Then add all the 3 views in one panel page variant one after another. Probably you already have these blocks. So you can clone them and just add a nid Contextual filter.
Another option is to create 3 different variants for the same node type and add a Selection Rule for the Show Date field (Selection Rules screencast). If there are no filters for the date field add some php code. Here is an example.
I have problem with richfaces calendar. I want to see only year and month so i made datePattern="yyyy/MM", which works fine until i want to change date.
When i click on button and calendar pop up the current value disappear. If i don't select date the value is null. I tried to save old date in my bean but problem remains because when i open calendar it is always set to todays date.
Problem occur only when i don't put dd(days) in datePatern
<rich:calendar value="#{myBean.date}" datePatern="yyyy/MM" />
Tnx for help in advance
I got answer on richfaces forum so i will copy it also here
I guess rich:calendar is not the right choice at you case although rich:calendar may be bound to probably any object type provided that you supply custom converter a day ordinal still should be supplied because it's a part of the date maybe you would do better with a h:selectOneMenu to specify a month and a h:inputText to define a year instead of "incomplete" rich:calendar
I am currently using a EXTJS EditorGridPanel in my application, and for one of the column inputs I require the user to be able to pick a month and day (no year).
I am currently using a DateField to do this, but I need to be able to disable the "year" aspect of it in the UI. I do not care if the "value" in the end has a year associated with it, I can simply disregard it. I have searched to see if anyone has done such a thing, but my only findings are people that way to show only Month/Year.
My other option is to create my own custom input (with comboboxes for month and day, where the day combo changes based on the month), however, I honestly don't have all that much time to make one myself as I would have to go through the learning curve since I have never created a custom input extension before.
--> So my big question then is, has anyone heard of an existing EXTJS month/day picker?
Any help would be much appropriated stack overflow peoples!
Although I would probably create my own custom component to use as the editor, if you're not comfortable doing that, have you considered breaking the Month and Day fields into separate columns in your grid column model?
Another option would be to add a input mask to the textfield (you'll need to specify one as a customEditor in your cm). I believe this is done via custom vtypes. This input mask would force the user to enter the date in the format that you specify.
Using this approach would :
keep all month/day data in one column
simplifies your UI code by using the out-of-the-box components. (IMO this is key for learning ExtJS)
try this one
picker: {
slotOrder: [ 'month', 'day' ]
}
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
Try something like:
{
xtype: 'datepickerfield',
name: 'OrderDate',
label: 'Order Date',
picker: { yearTo: 2011, yearFrom: 2020 }
}
I hope this will help you.