views:

179

answers:

1

I'm using a SWT DateTime component. It sets the current date as a default selection, when instanciated. How can i prevent this?

I want that no date is selected at all...

Thanks Patrick

A: 

You would have to manually set the fields of the instance to 0 or null whatever is appropriate. You could also implement your own NoDateTime object (using the null object pattern) to accomplish the same thing. I would be tempted to represent no time with just null though, is there a reason why you cannot do that?

willcodejavaforfood