How to mask Datefield in Flex? - apache-flex

Does anyone know how to mask the input in a DateField in flex?
Our DateField uses the format DD/MM/YYYY.
Our users want:
to be able to type the date in without having to type in the slash
still be able to use the date selection in the date chooser (the drop down on the date field)
I google’d and found ways to do this with 3 text boxes. I would prefer to have a DateField control. That way the users would be able to make use of the date chooser (drop down) as well.

I would suggest adding a KeyboardEvent to the DateField, and handle the logic of adding or removing slashes inside the event listener function.

I found the best way to do this is onFocusOut I take the text and add the slashes back and reset the formatted text, before any validation fires.
Full Code post to follow:

Related

Trying to display the export value of a dropdown menu selection in Adobe PDF

Let me start off by saying I have very limited knowledge of Javascript.
I've got a Dropdown menu called: CustomerType with 6 values in it.
Basically I just want whatever is selected in the dropdown to display again in another part of the PDF.
Can anyone help?
First set the properties on the dropdown to commit the value immediately. See image.
Then on the "calculate" script for the other field, enter the JavaScript below. You'll need to change the field names to your actual field names.
this.getField("myOtherField").value = this.getField("myDropdown").value;
You'll want to set the other field to read-only as well since the value is calculated.

I need to display a pop up table on clicking a button in vb.net. How do i do this without the gridviews just on plain button click?

I need a table to pop up or flash on the users screen when a button is clicked
It is a reference table, users can go back and check the codes while filling a form. This is to be done vb.net. Please help me i need the simplest solution possible
in my opinion:
1) If you don't insist on formatting and you would like to only display table data, you can simply write the data into string, which you will display in a MsgBox dialog. You'll probably will have to take care about partial string lenghts in columns (trim, or complete with spaces to a specific length) and then it will look OK. Bellow is an example of such data (only a test dialog) without any trimming/completeng:
2) For a serious table, you'd have to either use datagrdiveiw (or such) in a separate form, or draw your table using GDI, which would be a rather complicated and eccentric method.

textbox in gridview needs rich text editing; superscript, greaterthanequalto etc

I've got an ASP.NET page with VB.NET backend. It has a gridview, and users need to be able to edit the values in it.
It's dollar amount ranges that they are entering, and they need to be able to add superscript numbers at the end on occasion. The standard asp.net textbox does not support these features, nor is there a way for users to enter the greater than or equal to symbols.
I'm looking for a straight forward solution, we had been using the FCKEditor, but this was incredibly clunky, and I was trying to find something more like the inline editing of ckEditor for the duration.
The newer version of CKEditor seems to be built for textarea, and not asp:textbox, which is what the gridview uses for the edit template field. Anyone know any quick solutions for getting this functionality into a gridview edit mode textbox?
Additionally - I would settle for a back end conversion, where the user could enter "=<" and I could change it the appropriate symbol before storing it in the db... however, using
HTTPUtility.HTMLEncode(strValue.Replace("=<", "≤"))
just gives me "≤$500,000.00" which is worse...
here's what I did to solve this: I had the users enter "<=" or whatever for the ranges, and add a "^" prior to any superscript. Then I replaced the 2 characters with the Unicode values, and did an Decode on the string. For the superscript, I replaced the carrot with the "sup" tag, and added the closing tag at the end of the string. it's a bit of a hack, but the users can enter what they need, and the values get stored properly, and displayed correctly afterwords.

How to add custom attributes for items in a CheckBoxList?

I have a requirement of showing the check box list. And for each check box item, I have to store a custom attribute (apart from text and value) which I will use to compare in button click event.
Please suggest me better approach
thanks in advance..
You can concatenate the custom value with the value of the checkbox separating them with a well-known character or set of chearacters.
You can then retrieve and split values from the request.

Getting date into a label every time the date is changed

I am using this datetimepicker by Trent Richardson, I can get the date time picker to work, however after the date is changed i need it to be put into a hidden asp.net control that is in an update panel.
So how can i make it so everytime the user changes the date and time it is sent to a label.
http://trentrichardson.com/examples/timepicker/
So since it seems like it's just a extension of the jQuery ui datepicker, you could use the altField option: http://jqueryui.com/demos/datepicker/#alt-field
or the onSelect Event to do it yourself: http://jqueryui.com/demos/datepicker/#event-onSelect

Resources