Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm customizing a control for future use and I need to pass two time values to it as properties.

 

I thought setting them as Date would work, but from the properties window, only a callandar pops up. I'm sure I can set the time via code, but I want to make it be able to be set in the properties window.

 

Any suggestions?

Posted

There are lots of details in a Date/Time users of your control will be weary about and they could probably screw it up... why not just make a small form of your own to set the properties at design time.

 

Just a thought.

 

Brandon

i'm not lazy i'm just resting before i get tired.
Posted
There are lots of details in a Date/Time users of your control will be weary about and they could probably screw it up... why not just make a small form of your own to set the properties at design time.

 

Just a thought.

 

Brandon

 

They need to choose a range of times. A StartTime and an EndTime, so it's unavoidable that they don't select the times. It shouldn't be any complication other than having a time picker pop up and let people choose what time they want.

 

In theory I could make it a string and validate it into time format for display in the properties and convert it to date within the program. But I think there should be a way to do it using only date.

 

I wish date were broken down into Date and Time. If there was a Time data type, it would be so much easier in some cases, especially like this where the date means nothing, but the time (and all of the time functions like adding/subtracting time units) is the real meat you're working with.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...