Show Posts
|
Pages: [1] 2 3
|
3
|
General Category / EasyUI for jQuery / Clearing selection in combobox
|
on: August 14, 2024, 07:19:40 AM
|
In a combobox that is populated from a URL, it seems that it's necessary for the editable property to be true for the user to be able to clear the selection. They then have to manually erase the selection. I would rather set editable to false and be able to just press the Del key in order to clear the selection. Is that possible?
|
|
|
4
|
General Category / EasyUI for jQuery / Re: Double-click on date box to enter current date
|
on: April 18, 2023, 06:31:02 AM
|
I want to do this for all dateboxes, and on double-click, not single click. I tried this code but it doesn't work. $('.easyui-datebox').next().on('dblclick', function(){ if (!($(this).datebox('getValue'))){ var opts = $(this).datebox('options'); var value = opts.formatter(new Date()); $(this).datebox('setValue',value); } })
|
|
|
6
|
General Category / EasyUI for jQuery / Re: Default century in datebox
|
on: March 29, 2023, 02:10:46 PM
|
I posted this 5 days ago and haven't had an answer. Can you please reply? Thanks. I have dateboxes using US format (MM/DD/YYYY). If the user doesn't use the calendar, and types in the year as 2 digits, it defaults to 20th century dates (1923 instead of 2023). This seems like a bug. Can it be fixed?
|
|
|
7
|
General Category / EasyUI for jQuery / Default century in datebox
|
on: March 24, 2023, 08:39:42 AM
|
I have dateboxes using US format (MM/DD/YYYY). If the user doesn't use the calendar, and types in the year as 2 digits, it defaults to 20th century dates (1923 instead of 2023). This seems like a bug. Can it be fixed?
|
|
|
8
|
General Category / EasyUI for jQuery / Filter function on numberbox
|
on: March 19, 2023, 07:43:01 AM
|
Please refer to this discussion in which I asked how to disable the decimal point in a numberbox. https://www.jeasyui.com/forum/index.php?topic=8479.0I just discovered that on numberboxes where I use the code you provided, the getValue method no longer works when the value is changed.. Even after the change, getValue still returns the old value. I have to use getText instead. Can you explain the difference between getValue and getText for numberboxes? They always seem to return the same thing so I don't understand why getValue even exists.
|
|
|
9
|
General Category / EasyUI for jQuery / Re: Code to add key handler works in developer console, not when included in page
|
on: March 05, 2023, 10:34:20 PM
|
Your code didn't work and I figured out that it wasn't correct. You have the "extend" twice, and substituted "combo" for "datebox". I changed it to the following and it did work. $.extend($.fn.datebox.defaults.keyHandler, { up: function (e) { var d = $(e.data.target); var d1 = moment(d.datebox('getText')).add(1, 'days'); var d2 = d1.format('MM/DD/YYYY'); d.datebox('setValue', d2); }, down: function (e) { var d = $(e.data.target); var d1 = moment(d.datebox('getText')).add(-1, 'days'); var d2 = d1.format('MM/DD/YYYY'); d.datebox('setValue', d2); } })
|
|
|
10
|
General Category / EasyUI for jQuery / Code to add key handler works in developer console, not when included in page
|
on: March 05, 2023, 05:33:26 PM
|
I created this function to add a key handler to dateboxes that will increment /decrement the date when the up or down arrows are pressed. This code works when I enter it in the developer console after loading the page, but not when I include it in the page. I tried including it in the document.ready function and then placing it at the bottom of the page but it doesn't work either way - it does nothing. Where do I need to put this in order for it to work? Also, when figuring out how to do this, I found that in this code, $(this) returns the textbox that EasyUI creates internally, not the actual datebox component, and therefore it's necessary to use val() rather than getText or setText. Is there a way to get the datebox component here? It's not really important but would make the code more understandable. $('.easyui-datebox').datebox({ inputEvents:$.extend({},$.fn.datebox.defaults.inputEvents,{ keyup:function(e){ if ((e.which == 38) || (e.which==40)){ var days=(e.which==38) ? 1 : -1; var d1 = moment($(this).val()).add(days, 'days'); // uses moment.js date library var d2 =d1.format('MM/DD/YYYY'); $(this).val(d2); } } }) })
|
|
|
11
|
General Category / EasyUI for jQuery / Validate numberbox
|
on: February 20, 2023, 09:00:35 AM
|
I have some numberboxes where I don't want to allow them to be blank. If the user erases the field, I want to enter "0.00", and I want this to happen on the blur event without any message displaying. This will only apply to numberboxes containing a specific class name. I can't figure out how to use validation to do this. Please give me some sample code for this purpose. Thanks.
|
|
|
12
|
General Category / EasyUI for jQuery / Re: Problem with combobox getValue
|
on: February 08, 2023, 09:44:32 PM
|
The text is not being modified manually. I'm simply selecting it by clicking on the list, and limitToList is set to true.
I really can't figure out what's happening here. It's actually happening on two different comboboxes, but I have others, also populated from a database, where it works correctly.
Do you have any other ideas?
|
|
|
13
|
General Category / EasyUI for jQuery / Re: Problem with combobox getValue
|
on: February 08, 2023, 12:27:53 PM
|
Yes, that is data format from the server. Here it is. [ { "code": "", "name": ""},{ "code": "A1", "name": "A1 - COMFORTLITE EVA"},{ "code": "A3", "name": "A3 - SOFTFIT - EVA"}, { "code": "A4", "name": "A4 - SOFTFIT - PORON"},{ "code": "A5", "name": "A5 - SOFTFIT - CORK"}, { "code": "A6", "name": "A6 - COMFORTLITE PORON"},{ "code": "A7", "name": "A7 - COMFORTLITE CORK"}, { "code": "C6", "name": "C6 - CORK UNIBODY"},{ "code": "C7", "name": "C7 - CORK DUAL DENSITY"}, { "code": "D1", "name": "D1 - DRESSFIT"},{ "code": "D2", "name": "D2 - SLIM-FIT"},{ "code": "D4", "name": "D4 - CASUALFIT"}, { "code": "D5", "name": "D5 - CASUALFIT PLUS"},{ "code": "DL", "name": "DL - DIABETICFIT FLEXIBLE"}, { "code": "DR", "name": "DR - DIABETICFIT RIGID"},{ "code": "F1", "name": "F1 - THE CONTROLLER"}, { "code": "F2", "name": "F2 - UCBL"},{ "code": "F3", "name": "F3 - GAIT PLATE - Correct Intoe"}, { "code": "F4", "name": "F4 - GAIT PLATE - Correct Outoe"},{ "code": "F5", "name": "F5 - ADULT CONTROLLER"}, { "code": "F6", "name": "F6 - ADULT UCBL"},{ "code": "L1", "name": "L1 - LEATHER LAMINATE"}, { "code": "L2", "name": "L2 - LEATHER CORK"},{ "code": "L3", "name": "L3 - LEATHER EVA"}, { "code": "L5", "name": "L5 - LEATHER PORON"},{ "code": "L6", "name": "L6 - LEATHER SHAFFER"}, { "code": "L7", "name": "L7 - LEATHER BALANCER "},{ "code": "S1", "name": "S1 - SPORTFIT 3mm"}, { "code": "S10", "name": "S10 - SPORTFIT 4mm"},{ "code": "S2", "name": "S2 - SPORTFIT PLUS"}, { "code": "S3", "name": "S3 - COMFORTFLEX"},{ "code": "S4", "name": "S4 - GRAPHLITE I - Moderate"}, { "code": "S5", "name": "S5 - GRAPHLITE II - Semi-Rigid"},{ "code": "S6", "name": "S6 - GRAPHLITE III - Rigid"}, { "code": "S7", "name": "S7 - SPORTFIT FLEX"}]
I found that this problem actually occurs in two of the three functions where I use this combobox. In the other one the 'getValue' works correctly. Here is a screen shot showing the result when it works correctly, which as you can see is different from the previous screen shot. Can you tell me any possible reason why this would happen? I've tested this a lot and can't figure it out.
|
|
|
14
|
General Category / EasyUI for jQuery / Problem with combobox getValue
|
on: February 03, 2023, 08:36:17 AM
|
I am using a combobox populated from a database using this code. So when I use the 'getValue' method I assume I should get the valueField, not the textField. But I am getting the textField and can't seem to find any way to get the valueField. <INPUT class='easyui-combobox' ID='selMaterial' editable=false label='Material' labelWidth=80 style='width: 350px' data-options="valueField: 'code', textField: 'name', method: 'get', url: 'sql_main.php?proc=get_materials_select'">
This shows the data in the combobox, using the 'getData' method. And this shows the result of 'getValue' which is actually the same as 'getText'). Why is 'getValue' returning the valueField?
|
|
|
15
|
General Category / EasyUI for jQuery / Re: Combobox scroll on select
|
on: January 30, 2023, 08:18:35 AM
|
This works as a standalone but doesn't work on my page. My combobox is populated from a database using a url so maybe that makes a difference somehow.
Anyway, why didn't you mention the scrollTo method before, since that was my basic problem? This method isn't listed in the documentation at all. Are there other methods/properties/events that are undocumented??
|
|
|
|