Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Nadeem Shah
  Where is Nadeem Shah?
 Rawalpindi
 Pakistan
 Nadeem Shah
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: Date and Time Picker
Thread ID: 394035 Message ID: 394200 # Views: 94 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Tuesday, December 31, 2013 2:24:37 PM         
   


> Hi Foxitians,
>
> A couple of weeks ago I posted a date picker class. At that point in time
> a couple of members asked about a date and time picker component. Due to
> this request in some spare time I added into the class a date and time
> picker object.
>
> Below is what it looks like in it's shrunk down size:
>
>
> Below is what it looks like when dropped down for date picking.
>
>
> I have added in a long list of properties for easy customization as outlined below:
>
> closeonupdate
> This property if .T. will close down the date and time picker to its minimum size
> after a new date has been selected. If set to .F. the calendar picker will not close and remain open.
>
> cmdbuttonsbackcolor
> This property set the background color of the up/down, previous/next command buttons.
> This property accepts any legal RGB() color setting such as, RGB(129,129,129)
>
> cmdbuttonstoolbarbackcolor
> This assigns a background color to the shape that the previous/next and month and
> year displays are in. This property accepts any legal RGB() color setting.
>
> currdate
> This property is used internally to track the current date.
>
> datepicked
> This property is used internally to track the date picked or selected.
>
> datetimechgmethod
> This is a method that currently is not being used, but added in for future use if required.
>
> dtpickercontrolsource
> This property is where you enter in the Table or Cursor name dot DateTime field that will be
> bound to the class. This is the field that will be unpdated as date and time changes are
> made in the date and time picker. The format for this entry is TableName.FieldName
> Please be aware the field must be a datetime field type or errors will result.
>
> firstdayofweek
> This property is not avaiable in the date and time picker, but is available in the other date
> picker only class controls. If set to a 1 the first day of the week displayed is a Sunday,
> if set to a 2 the first day of the week displayed is a Monday.
> (This option maybe added into the date and time picker class in the future)
>
> getcurrenttime
> This is an internal method that is responsible in determining the current time setting
> in the control and converting this into a date + time string and then into a
> datetime formatted string value.
>
> getcurrenttimeonselection
> This is a property that can be set to .T. or .F. If set to .T. when you select a
> date the time portion becomes the current system time.
>
> getputdatetimevalue
> This is an internal method responsible in writing the selected date and time and writing it to the
> underlying field that may be bound to this control. If buffermode-5 is used on the table then
> of course a TableUpdate is required to make this date and time change permanent.
>
> gotfocusflag
> This is an internal property that is used to check as to what time component currently
> has the focus. ie: the hh, mm, ss, AM/PM entry boxes.
>
>
> gotfocustxtdatebackcolor
> This is a property that sets the background color of the entry locations when they receive the focus.
> This property accepts any legal RGB() color setting.
>
> initfireflag
> This is an internal property that tracks if this is an initial INIT event happening.
> This flag will flip to .T. and .F. during the initial loading of this date and time picker class.
>
> isdateblank
> This is an internal property that flips to .T. if the date entry is sensed to be blank or empty.
> It will flip to .F. if the date entry has a date value in it.
>
> lostfocustxtdatebackcolor
> This is a property that sets the background color of the entry locations when they loose the focus.
> This property accepts any legal RGB() color setting.
>
> maincontainerbackcolor
> This property sets the background color for the main body of the calendar control.
> This property accepts any legal RGB() color setting.
>
> newdate
> This is an internal method that populates the calendar day numbers with the correct days
> to match the month and year selected.
>
> newdefaulttime
> This property can be set to default the time to a specific time when a new date has been selected.
> The value entered in this property has to be in the following format: 11:49:59 AM.
> Where 11 is the hour, 49 is the minute, 59 is the second and AM is morning.
> Am could be set to PM also. A legal hh:mm:ss AM or hh:mm:ss PM format must be entered
> in here to avoid errors.
>
> newetime1200am
> This is a property that can be either .T. or .F. If set to .T. with a new date selection
> the time will be set to 12:00:00 AM. If a newdefaulttime property has been entered the
> newdefaulttime will take effect and superceed the newtime1200am property setting.
>
> newtimewithdatechange
> This is a property and it set to .T. a new time will always be selected with any date change.
> If set to .F. the current time will remain.
>
> originaldatetime
> This is an internal property to hold the original date and time prior to making and date
> or time changes in the date and time picker control.
>
> showtodaysdate
> This property if set to .T. will show today's date on the calendar control at the bottom once
> the control has been expanded. If set to .F. today's date will not be displayed on the control.
>
>
> Since the zipped up project is too big to upload here in Foxite you can download it from
> my DropBox folder at the following link:
>
> https://www.dropbox.com/s/emn9fauwxdhsdfn/PSDatePicker.zip
>
>
> Pete "the IceMan", from the Great White North of Canada.
> www.marathongriffincomputers.com

Thanks Pete to add here nice datetime class.

Nadeem Shah

ENTIRE THREAD

Date and Time Picker Posted by Pete Sass @ 12/29/2013 2:51:13 PM
RE: Date and Time Picker Posted by Benny Thomas @ 12/30/2013 1:53:10 PM
RE: Date and Time Picker Posted by Nadeem Shah @ 12/31/2013 2:24:37 PM
RE: Date and Time Picker Posted by Koen Piller @ 1/19/2018 3:40:08 AM
RE: Date and Time Picker Posted by Gerrit Broekhuis @ 1/19/2018 10:30:38 AM
RE: Date and Time Picker Posted by Pete Sass @ 1/19/2018 7:01:01 PM
RE: Date and Time Picker Posted by Gerrit Broekhuis @ 1/19/2018 7:05:01 PM
RE: Date and Time Picker Posted by Pete Sass @ 1/19/2018 6:59:37 PM
RE: Date and Time Picker Posted by Koen Piller @ 1/19/2018 9:51:39 PM
RE: Date and Time Picker Posted by Pete Sass @ 1/19/2018 10:32:35 PM
RE: Date and Time Picker Posted by Koen Piller @ 1/19/2018 10:40:45 PM
RE: Date and Time Picker Posted by Pete Sass @ 1/20/2018 1:50:53 AM
RE: Date and Time Picker Posted by Ahsan Rana @ 1/20/2018 6:35:49 AM