I am unable to select date using watin from the following calender
https://members.myactivesg.com/facilities/view/activity/207/venue/355?time_from=1411315200
any one please help ??
It looks like the calendar ID textbox changes on every page load so you need to look for an alternative way to identify that particular element (a textbox in this case) and the way to do it, in this case is using the class. The class for that particular textbox it has datepicker AND hasDatepicker so searching an element with those two classes brings the correct textbox and then you can assign the date you need in the format the page expects it.
ie2.GoTo("https://members.myactivesg.com/facilities/view/activity/207/venue/355?time_from=1411315200");
TextField t = ie2.TextField(Find.ByClass(p => p.Equals("datepicker hasDatepicker")));
t.Value = "The date you need in the format they expect";
Related
I was wondering if it is possible to write a custom editor (StandardEditorProps) that displays multiple input fields dynamically for every query (every series in the dataFrame).
I would need the same form (labels, bunch of select and text input fields) repeated for every query (I need to get the field names of the query resultset).
These values will be then used to render the custom panel plugin.
If I return, in StandardEditorProps, the entire form, then onChange every select input field is updated with the same value and I cant get the value of every input field in the custom panel plugin as only one customEditor is added in the module.tsx.
On the other hand, If I define multiple custom (and others non custom) editors in module.tsx I can get the values in the panel plugin but I cant make N such forms dynamically.
Hope that makes sense.
Does anyone have any suggestions or ideas how achieve that?
I'm using react-day-picker DayPicker (not DayPickerInput) and have an existing element I want to use to drive the date popup. I can't figure out how to pre-feed the date from the element to the calendar and highlight the given date. All the other functionality, e.g. capturing the user chosen date and populating the element are working fine. So if my input element has Nov 11, 2019, and I click on it, I want the popup to go to that date and show it as selected. The current behavior is that it shows the current month and date. I've tried to set the selectedDays={this.state.selectedDay}, but that doesn't seem to work. Note that I am new to reactjs, and this could be the gap in my understanding.
Thanks for any suggestions you may have.
Found at least one way to achieve the behavior I was looking for. There is a DayPicker property "initialMonth" that will display the current month. Note that this only needs to be populated only with year and month:
initialMonth = {new Date(selectedDate.getFullYear(), selectedDate.getMonth())}
I am using Extjs datepicker.
I want to select multiple dates of datepicker by dragging over them.
For that I tried to make calendar dates draggable. I took the reference from here https://docs.sencha.com/extjs/5.1/core_concepts/drag_drop.html and wrote below mentioned code.
var calendarDate = Ext.get('DatePickerSchedule').select('td');
Ext.each(calendarDate.elements, function(el) {
var dd = Ext.create('Ext.dd.DD', el, 'datesDDGroup', {
isTarget: true
});
//Apply the overrides object to the newly created instance of DD
Ext.apply(dd, window.overrides);
});
But it doesn't seems to be working. Please suggest what I am missing.
Check out this Previously Answered Question. There's a fiddle provided that demonstrates how to implement multi-select on a date picker. It doesn't use dragging but it may be a suitable solution for your needs.
EDIT:
So this question really got me interested in how you might go about solving this. So I've had a play around and created custom date picker that extends the ExtJS datepicker but provides drag support for multiple selections using the mouse listeners I had suggested in my comment.
The fiddle can be found here DraggableDatePicker
One improvement you may want to make is to make the component aware of rows and the values within rows, so that when you mouse over a new row all dates on that row (prior to the one currently with the mouseover) are selected. My solution only cares about individual cells that are dragged over.
How would one configure a combobox component to contain both store-bound items, as well as a calendar picker in the display field (for manual entry)?
It isn't really clear but what you want exaclty but you can override the createPicker method on the combobox. That way you can put anything in the picker.
e.g. a container with a vbox layout containing a calender picker and a grid/boundlist
I have done something similar once. I have one where I've overridden the picker to contain a tree. You just have to return the component and bind actions. (itemclicks etc)
Is there a extjs based datetimepicker?
I want user can select date and time together.
Unfortunately there is not a DateTimePicker out of the box, but there are two separate components named TimeField and DateField that can be used in conjunction to get the functionality you desire.
If you'd rather use Saki's DateTime user extension, take a look at DateTime Field. The class comments describe DateTime as "[a] combination of DateField and TimeField", so nothing too crazy is going on if you'd like to create your own unique version.
Check out Saki's DateTimeField: at http://www.extjs.eu/
"Combined Date and Time Field for applications where entering both date and time is required. Suitable also as Grid Editor. Contains renderer directly usable by grids."
There's also this one, works in ExtJS 4.1, but uses number spinners for selecting time, can be reworked relatively easily to use the built-in time picker.