|
Title: bug on updating the validtype options in timespinner Post by: omhardb on April 07, 2014, 04:37:19 PM As the subject said, i try to use a timespinner but changing the validType option depending on other options that the user selects (my goal is to have a dynamic validation). In order to do this, i create several new rules in the validatebox.defaults.rules that will be set up or reset up in case are needed. In the first time, i don't have any problem with the first configurated validation, it is setting in the options of the timespinner and it is recognized; however, in a second or third time, when i change or add a new validations to the validType of the timespinner, only is recognized the first one the i set.
Tell me, please, if is possible to change or add new validations in the validType of the timespinner, or it is not possible? or maybe, i do this in a wrong way? I think having the option to change validations when I need it is important, but tell me if there are any limitations in this regard. Thanks for your help, Title: Re: bug on updating the validtype options in timespinner Post by: stworthy on April 07, 2014, 11:44:06 PM Please try the code below to change the validType parameter value.
Code: var t = $('#tt'); // the time spinner objectTitle: Re: bug on updating the validtype options in timespinner Post by: omhardb on April 08, 2014, 10:16:31 AM Dear Administrator,
I have already tried to set up the options of the timespinner, using the validType, as you told me. However, in my case, i don't have only one validator in this validType, i have an array of validators, which items (and length) changes each time that user selects. However, i forgot to said that i'm using the 1.3.5 version of easyui. Maybe, in the new version, you don't have this problem. Please confirm if this problem would be solved in the new version. Thanks and regards, Title: Re: bug on updating the validtype options in timespinner Post by: stworthy on April 08, 2014, 03:24:38 PM The 'validType' value can be a single value or an array with values. To do multiple validation, try this:
Code: var t = $('#tt'); // the time spinner objectTitle: Re: bug on updating the validtype options in timespinner Post by: omhardb on April 11, 2014, 10:11:38 AM Dear Adiministrator,
I know that the validType accept one value or an array with values, and as i said, i'm using as an array, but, when i update or changes items of that array and set in validType, only the first element of the array is in the validType, and other are losing. And also, i realize that this first element, is the first element that i set up in the first time. Thanks and Regards, PS: The version of jeasyui that i'm using is 1.3.5 Title: Re: bug on updating the validtype options in timespinner Post by: stworthy on April 11, 2014, 12:00:40 PM You may need to provide an example shows how to use an array.
|