EasyUI Forum
July 17, 2024, 04:14:50 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / combobox: registering multiple handlers on the 'select' event on: February 18, 2020, 08:06:39 PM
Hi.
Similar to this* use-case: How can >1 handlers be registered on the 'select' event, from different source files?
Thanks,

* https://www.jeasyui.com/forum/index.php?topic=4009.0
2  General Category / General Discussion / calendar: overloaded 'onSelect'. datebox no-longer get filled with selected date on: October 28, 2019, 12:08:17 AM
Hi.
I am using a datebox.
Code:
$("#foo").datebox('calendar').calendar({
    validator: someValidatorFunc,
})

When I click on a date, the date gets pasted into the input field. All's well.


Then I added this handler:

Code:
$("#foo").datebox('calendar').calendar({
    validator: someValidatorFunc,
    onSelect: function () {
        //..
    }
})

Clicking on a date now has no effect: the calender stays open, and the input field does not get filled with the selected date.

Could it be that attaching an 'onSelect' handler breaks datebox? Is onSelect required to return some value, or call some function?

Thanks,

3  General Category / General Discussion / datebox: formatter operates on current date, not selected date on: October 24, 2019, 09:03:21 PM
Hi.

I'm having a hard time getting formatter to work as-expected.


Code:
<!DOCTYPE html>
<html>
<head>
    <script>
        $(function () {
            $("#foo").datebox({
                formatter: function (date) {
                    let y = date.getFullYear();
                    let m = date.getMonth() + 1;
                    let d = date.getDate();
                    return d + '-' + m + '-' + y;
                }
            })
        })
    </script>
</head>
<body>
    <input id="foo"/>
</body>
</html>

I expected that upon selecting of a date, the datebox will fill the input with the selected date, formatted by the declared formatter. The formatter works, but it renders today's date, instead of the selected one.

Guidance appreciated.
4  General Category / General Discussion / Re: form: clear vs reset on: October 08, 2019, 11:53:17 PM
Thanks. I find though that this explanation doesn't add much on-top of the quoted docs... Perhaps if someone can explain the methods without circular references (like 'the reset() method resets and the clear() method clears').
Is it that 'reset' will revert the field to a default value, whereas 'clear' will set it to an empty string? What does a field's 'status' include?
5  General Category / General Discussion / form: clear vs reset on: October 07, 2019, 08:47:53 PM
Hi.
Would appreciate someone clarifying the difference between the two methods.
The docs have only this:
Quote
clear   none   Clear the form data.
reset   none   Reset the form data. Available since version 1.3.2.

Thanks!
6  General Category / General Discussion / Re: form inputs: validation not working on: October 07, 2019, 03:47:59 PM
Ok. When you say I need to
Quote
create or parse it as an easyui component before using it
could you elaborate on that? Better yet - point me to where the docs explain how parsing of input fields is invoked, and when it should be invoked. I cannot spot any 'parsing' triggered in the validatebox demo at https://www.jeasyui.com/demo/main/index.php?plugin=ValidateBox - it only annotates divs with the 'easyui-validatebox' class and respective 'data-options'.

I am particularly keen to understand the use-case for the 'easyui-validatebox' class. If an input field has to be programmatically-set to validate, what is the use of declaring that class?

FWIW, the input in the form I am adding is not appended dynamically. It is sent as part of the DOM in the http response (I can see it in the response's payload).
7  General Category / General Discussion / form inputs: validation not working on: October 03, 2019, 06:12:26 AM
Hi.
I'm attempting to introduce some new forms into an existing webapp.
input validation on existing forms works fine. But on new forms I've added, it doesn't work. I am finding it hard to spot the issue and would appreciate some guidance.

An example of an input would be:
Code:
<input name="name"  type="text"  class="easyui-validatebox" data-options="missingMessage:'foo',required:true" />
This validation isn't happening. Examining the DOM shows that the validatebox-text & validatebox-invalid classes, typically appended to invalid inputs, are not there.
If I call
Code:
$("form :input[name='name']").validatebox()
in the console, then the above classes appear, and the field is validated.

I cannot spot calls to validatebox() on the existing forms, so assume there's no need to call it explicitly. At a loss then as to why some form validation is occurring and some doesn't.
Thanks,
8  General Category / General Discussion / Re: applying multiple validation rules using the valideType attribute on: October 02, 2019, 11:52:54 PM
Thanks.
In the "validate box" documentation I see the following use of the 'required' attribute:

<input id="rpwd" name="rpwd" type="password" class="easyui-validatebox"
    required="required" validType="equals['#pwd']">

Is that actually how it's meant to-be specified?

Could you point me to the documentation specifying the use of this attribute, plus all builtin validations?
Thanks,
9  General Category / General Discussion / removing an easyui dialog from DOM on: October 01, 2019, 12:28:12 AM
Hi.
After using dialog('open') to create a dialog, how can I remove the dialog from the DOM? I.E. not merely closing the dialog, but reverting the DOM to how it was before the call to dialog('open')?
Thanks!
10  General Category / General Discussion / applying multiple validation rules using the valideType attribute on: September 30, 2019, 05:14:15 PM
Hi.
Would appreciate guidance on how to set >1 validation rules on a form input, using the 'validType' attribute (not 'data-options').
Thanks.
11  General Category / General Discussion / data-options: where are the docs? on: September 19, 2019, 01:45:16 AM
Looking at https://www.jeasyui.com/documentation/tabs.php, there's mentioning of a "data-options" attribute. It's also common to other components.
Where can I find the full specification for this attribute?
Thanks,
12  General Category / General Discussion / Re: declaring menulink in html on: September 17, 2019, 06:03:28 PM
Thanks, but even if I go along with such a solution, there's still logic (js code) in the html, and I rather avoid that.
13  General Category / General Discussion / Re: declaring menulink in html on: September 16, 2019, 02:30:22 AM
Thanks Jarry, but not really what I am after.
I am looking for easyui to provide the solution, one that can be used declaratively, without any extra js. The whole point of using the library is to save me the need to write my own impl.
14  General Category / General Discussion / declaring menulink in html on: September 16, 2019, 01:05:28 AM
Hi.
I wish to create a menuButton declaratively (not through js). Could not it in the docs. What I'm after is quite straight-forward:
  • build a dropdown menu out of the set of properties retrieved from a backend. Each property has text and code. The text is what needs to be displayed;the code - gets sent to the backend whern a menu item is selected.
  • When user selects an option, a url is hit on the backend, providing the a/m code.

Thanks.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!