[CLOSED] Enter exact time into timefield instead of select existing option

  1. #1

    [CLOSED] Enter exact time into timefield instead of select existing option

    Hi,

    I have an odd ball question (from our user) regarding to timefield. We're currently have couple timefields with 10 minutes interval. Our users want to know if they can enter their own time instead of select the existing time in the dropdown list. Yes, I realize we could just give them the textbox option and handle the formatting of their input. However, they like to have the select existing time option plus the additional option to type in the exact time when needed (i.e. 12:13 pm instead of 12:15 pm).

    Yes, I'd like to have cake and eat it too, but they're paid customers and we just try to keep them happy. :-)

    thanks,
    Daniel
    Last edited by Daniil; Jan 14, 2011 at 8:46 PM. Reason: [CLOSED]
  2. #2
    Hi,

    What about to set Increment="1" for the field?
  3. #3
    Hi Vladimir,

    Yeah, I thought about that too, but it will produce a long list for them to select. Come to think of it. They can enter the time instead of selecting it. Good suggestion. I'll run it by them to see if they'll ok with it. Thanks for your help. You guys are great.

    Dan
  4. #4
    Quote Originally Posted by dnguyen View Post
    Yeah, I thought about that too, but it will produce a long list for them to select. Come to think of it.
    Hi Dan,

    Well, a solution can look something like this.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    
        <script type="text/javascript">
            var filter = function(store) {
                store.filterBy(function(record) {
                    return Ext.net.StringUtils.endsWith(record.get("field1"), "0");
                });
            }
        </script>
    
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:TimeField runat="server" Increment="1">
            <Listeners>
                <Expand Handler="filter(this.store);" />
            </Listeners>
        </ext:TimeField>
        </form>
    </body>
    </html>
  5. #5
    How about just adding a link (or Button) next to the TimeField with Text="Now". Then set the Time to "now" when clicked.
    Geoffrey McGill
    Founder
  6. #6
    Thanks Daniil, Geoffrey, and Vladimir for all of your suggestions. I'm forwarding the suggestions to our Business Analyst, and will implement them once I get the feedback from the BA.

    By the way, can we force the timefield to always use am/pm time format instead of military time (1:00 - 24:00)?

    thanks,
    Dan
  7. #7
    Hi,

    Please use a respective Format.

    Example
    <ext:TimeField runat="server" Format="g:i a">

Similar Threads

  1. [CLOSED] "Select All" option in MultiCombo
    By pj_martins in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 31, 2013, 9:13 PM
  2. Replies: 2
    Last Post: Jun 06, 2012, 6:18 PM
  3. Replies: 3
    Last Post: Dec 21, 2011, 8:40 AM
  4. Select all option in MultiCombo
    By skrishnasamy in forum 1.x Help
    Replies: 0
    Last Post: Aug 12, 2010, 7:02 AM
  5. TimeField problem how to display the time
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2009, 8:52 PM

Tags for this Thread

Posting Permissions