Is there a extjs based datetimepicker? - extjs

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.

Related

antd Default table design does not work with Select Options and Date Picker

The antd tables work well with Input components. I have been using the editable cell example at https://ant.design/components/table#components-table-demo-edit-cell and it works well with undo / redo functionality.
The Select / Options and Date Picker components however do not have any documentation in the context of a table that's hooked up to a state. I have gotten the Options / Date Picker to work but when implementing undo / redo logic, it looks like their state does not by default update like the Input fields. If you Google this, it is a tricky part of React in general to get these components to update automatically with state changes in a Form.
Is there an example of an antd table with select or date picker that's hooked up to state information?
I got the Select / Option to work correctly visually e.g. default states load correctly, depending on selection color changes etc. I can manipulate the data as needed. Similarly, got the Date Picker to work. However, where I am stuck is automatically tying state changes to update the components. I can probably do some crazy stuff like force render but before going that route wanted to check if there is a cleaner / better antd way of doing this.
I think you have to custom return to default Editable Cells like the following example url example
After wasting many hours on this, it looks like there is a bug in antd Forms. See this SO thread: React | Ant design select value not setting
In short, removed the Form.Item and everything works fine.

Disable past dates in a picker

How can I disable past dates in the picker? I want the users to choose only the future dates. So what I want is to disable the current date and all the past date so that one can only choose the date from tomorrow.
Picker datePicker = new Picker();
datePicker.setUIID("small");
datePicker.setType(Display.PICKER_TYPE_DATE);
The Picker class doesn't allow you to set the min or max dates. You can file an RFE on this in the CN1 issue tracker.
The Spinner class, however, does allow you to set a minimum and maximum date. Spinner is marked deprecated since we try to encourage use of Picker when applicable - mainly because it uses the platform's native picker widget when available, and generally results in better UX. In certain cases, like this, you can fall back to Spinner and it should still be fine.

select multiple dates by dragging over datepicker dates

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.

Edit the date using DateTimePicker

I am able to edit month,date and year by using TAB or Arrow keys(MM-dd-yyyy). I have doubt is this possible to edit total date format at a time (not using tab key or any arrow keys).
No, I don't think this is possible. From Using the DateTimePicker Control
The DateTimePicker operates as a masked edit control for entering date and time values. Each part of the date or time is treated as a separate field within the edit portion of the control. As the user clicks on each field, it is highlighted and they can use the up and down arrow keys to increment or decrement the value of the field. The user can also type values directly into the control, where applicable.

Date Picker Today Option In WPF

Is there any property , option available in the date picker control so that if user want to select today from any date from current date ?
e.g if user is view current month of last year then he has the option to select current date ?
just see this link and how they are implementing the Today button in the Datepicker WPF Toolkit). This link is from the WPFToolkit discussion forum. May be this will help you.
http://wpf.codeplex.com/Thread/View.aspx?ThreadId=85516
i think there is no option that there is a button directly in the control.
You can use a button outside the control, or something like this to set the current date.
Or you build a custom control....
I just hacked together a simple example. It is VS 2010. www.mbgr.de/CurrentDateWpf.zip.
No warranty at all on this one. Use at your own risk :-)

Resources