#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Mumbai
    Posts
    108
    Rep Power
    13

    DTPICKER ... Can we show CLOCK instead of calender ?


    I am really thankful to this forum for timely and accurate information...


    I had developed an application where in user wnat the time in Hours (with am and pm e.g. 9 am, 1 pm , 4 pm etc)

    I can customise the dtPicker that will show the Hours with am and pm with 'hh tt'

    But when user clicks on DtPicker, its shows a clendar...can we show the click or any thing relevan to time ? and definitely not the calendar...which is irrelevant

    with regards
    Vikas Tahavale
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Posts
    790
    Rep Power
    15
    If you set the format property of the DTPicker control to dtpTime, it will display the time in hh:mm:ss with AM or PM.

    Also, where the format is set to dtpTime, the user doesn't get the calendar when clicking the control. It will scroll through the selected part of the time which by default is the hours.

    You can also programmatically control what time is displayed by the control when it loads.

    Is there any particular reason you don't want the minutes and seconds showing?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Mumbai
    Posts
    108
    Rep Power
    13

    This topic is closed...client want only hours


    Thanks for te accurate feedback !

    The client stores the delivery time in this case and donot want Minutes and seconds.


    thanks again for response

    Withr egards
    Vikas Athavale
    Last edited by vikaspa; December 29th, 2002 at 05:12 AM.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Posts
    790
    Rep Power
    15
    If you only need Hours with no minutes and don't want a calendar to drop down, why not just use two regular combo boxes?

    In one, list the values 1 through 12 and in the other list AM and PM. Then you don't have the issue with the calendar appearing in the DTPicker.

    Code:
    Dim i As Integer
    i = 1
    Do While i <= 12
    Dim strHR
        strHR = i & ":00"
        cboHrs.AddItem (strHR)
        i = i + 1
    Loop
    cboAMPM.AddItem ("AM")
    cboAMPM.AddItem ("PM")

IMN logo majestic logo threadwatch logo seochat tools logo