ghuntley / ext.ux.touch.datetimepicker Goto Github PK
View Code? Open in Web Editor NEWSencha Touch plugin that extends Ext.Picker to provide a Date/Time functionality.
Home Page: http://www.ghuntley.com/
License: MIT License
Sencha Touch plugin that extends Ext.Picker to provide a Date/Time functionality.
Home Page: http://www.ghuntley.com/
License: MIT License
Hi, thanks for developing this component. We are using it in a old project, and it seems that the "official" scrollwheel patch doesn't work. This is the code on sencha forums to be able to use the mouse scrollwheel when on desktop. It works with the rest of lists and pickers, but not with yours. Do you know how can we solve it? Thanks!!
if (Ext.os.is.Desktop)
{
// Native scrolling in Browser
document.addEventListener('mousewheel', function(e){
var el = e.target;
var offset, scroller, _results;
_results = [];
while (el !== document.body) {
if (el && el.className && el.className.indexOf('x-container') >= 0) {
var cmp = Ext.getCmp(el.id);
if (cmp && typeof cmp.getScrollable == 'function' && cmp.getScrollable()){
var scroller = cmp.getScrollable().getScroller();
if (scroller) {
var offset = {x:0, y: -e.wheelDelta*0.5};
scroller.fireEvent('scrollstart', scroller, scroller.position.x, scroller.position.y, e);
scroller.scrollBy(offset.x, offset.y);
scroller.snapToBoundary();
scroller.fireEvent('scrollend', scroller, scroller.position.x, scroller.position.y-offset.y);
break;
}
}
}
_results.push(el = el.parentNode);
}
return _results;
}, false);
}
appears completely broken. values to pick from are not available
Not enough screen space makes the inputs just ...
So I've got the following code:
items: [
# Fields
{
xtype: "fieldset"
defaults:
required: true
labelAlign: "left"
labelWidth: "40%"
items: [
xtype: "textfield"
name: "name"
label: "Name"
placeHolder: 'My Event'
useClearIcon: true
,
xtype: "textfield"
name: "description"
label: "Description"
placeHolder: 'is awesome'
useClearIcon: true
,
new Ext.ux.touch.DateTimePicker(
useTitles: true
id: "dt"
value:
day: 23
month: 2
year: 2000
hour: 13
minute: 45
listeners: hide: (picker) ->
window.alert (picker.getValue())
)
]
},
# Actions
{
xtype: "fieldset"
items: [
xtype: "button"
text: "Submit Event"
ui: "confirm"
handler: ->
Evently.Views.eventForm.submit waitMsg:
message: "Submitting"
cls: "demos-loading"
]
}
]
However that is not rendering the DateTimePicker correctly, is there a way to use it with xtypes like the other two fields?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.