This is a migrated thread and some comments may be shown as answers.

Weird behaviour on inserting part time

1 Answer 13 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Tayger
Top achievements
Rank 1
Iron
Tayger asked on 09 Oct 2017, 09:21 PM

Hello there

It took me some hours to nail this behaviour down to the problem: I have a time mask in which the user can enter a complete time or some part of a time. Anything left out will be interpreted by my code. After entering the (part) time by the user I do some checks in the change event of the MaskedTextBox and write the validated (part) time back into the MaskTextBox field. In some cases that doesn't work, f.e.:

User enters:     Insert after validation:
10:__:__ AM    10:__:__ __

It should have inserted '10:__:__ AM' (like the original what the user typed)

I have attached a working example to this message. You'll see a MaskedTextBox and you only have to click the button 'Insert time'. This simulates the insert I do after time validation. This will work as it should and inserts '10:__:__ AM', fine! Now disable/remove the CDN script source 'http://kendo.cdn.telerik.com/2017.3.913/js/kendo.all.min.js' and activate/locate the kendo.all.min.js of the downloadable KendoUi of 'kendoui.for.jquery.2017.3.913.commercial.zip': This time the 'AM' will not be inserted by the 'Insert time' button.

I have no idea why it works with the CDN version but not with the downloadable commercial package (same version). I assume there are differencies. To make it even more confusing: Inserting a complete time like '10:10:10 AM' works fine in both cases.
I do already all this with a DATE MaskedTextBox (dd.mm.yyyy) and there it works fine (for full date or part of date).

Greetings

1 Answer, 1 is accepted

Sort by
0
Tayger
Top achievements
Rank 1
Iron
answered on 09 Oct 2017, 10:06 PM
My apologize, I had an old version of KendoUI on my server. You can ignore/close/delete my thread.
Tags
MaskedTextBox
Asked by
Tayger
Top achievements
Rank 1
Iron
Answers by
Tayger
Top achievements
Rank 1
Iron
Share this question
or