Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » CalendarCtrl » DropTime problem
Re: DropTime problem [message #19560 is a reply to message #19556] Mon, 15 December 2008 18:22 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Tom1 wrote on Mon, 15 December 2008 19:27

Hi,

I'm using the DropTime control for entering time/date. I have set up the environment as follows.

SetDateScan("ymd");
SetDateFormat("%1:04d-%2:02d-%3:02d");
SetDateFilter("\a -.,/");


The date set in code or if selected from the calendar is correctly visualized e.g. for the current time as: "2008-12-15 16:20:55".

Now I'm trying to type in the desired date into the DropTime control, but it is impossible to feed the '-' character (hyphen/dash/minus/whatever) into the control. It seems, only . : and space work correctly as delimiters. I can't seem to find where the characters get filtered out. Help, anybody?

// Tom


Hello, Tom.
You can see ConvertTime in the "Core/Convert.cpp":
int ConvertTime::Filter(int chr) const
{
	if(IsDigit(chr) || chr == ' ' || chr == '.' || chr == ':')
		return chr;
	if(chr == ',')
		return '.';
	return 0;
}

DropTime using it in the EditTime:
typedef EditMinMax<Time, ConvertTime> EditTime;

DropTime::DropTime() : DateTimeCtrl<EditTime>(CalendarClock::MODE_TIME) {}

[Updated on: Mon, 15 December 2008 18:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New SetDate for DateTimeCtrl
Next Topic: Clock small scale
Goto Forum:
  


Current Time: Sat May 04 06:00:06 CEST 2024

Total time taken to generate the page: 0.02539 seconds