I am new to appcelerator.Do we have a widget for Calendar which can implement Month week and Day View.I was searching through some widgets http://gitt.io/ but couldn't find one.Can some one help me with this?
My specifications are :Application Type:Mobile titanium SDK:4.0.GA Platform & Version :iOS 8 xcode :6 Host os IOS,target device :iPad
Related
We used following code to get the time
Calendar now = Calendar.getInstance();
int hour = now.get(Calendar.HOUR_OF_DAY);
int minute = now.get(Calendar.MINUTE);
int amPmVal = now.get(Calendar.AM_PM);
But when we change Timezone to New York in iPad it gives 1 hour less.
Can we handle this DST issue in codename one?
You set the hour but didn't set the date so DST might not be in effect. Also make sure DST is correctly set in the iPad itself and not just the hour.
Creating the object for Calendar and get the time and hour and minute from it.
It gives one hour less in iPad devices for Easter Time Zone (-5:00).
is this existing, does we need to consider any code changes on creating the Calendar Object.
Calendar now = Calendar.getInstance();
Dialog.show("Time value -- 1", now.getTime().toString(),"ok",null);
now.set(Calendar.YEAR, now.get(Calendar.YEAR));
now.set(Calendar.MONTH, now.get(Calendar.MONTH));
now.set(Calendar.DAY_OF_MONTH, now.get(Calendar.DAY_OF_MONTH));
now.set(Calendar.HOUR_OF_DAY, now.get(Calendar.HOUR_OF_DAY));
now.set(Calendar.MINUTE, now.get(Calendar.MINUTE));
now.set(Calendar.DAY_OF_WEEK, now.get(Calendar.DAY_OF_WEEK));
Dialog.show("Time value -- 2", now.getTime().toString(),"ok",null);
Dialog.show("Time value -- 3", " "+now.getTimeZone(),"OK",null);
java.util.TimeZone timeZone = (java.util.TimeZone)now.getTimeZone();
Dialog.show("timeZone.useDaylightTime() -- ", timeZone.useDaylightTime()+" " ,"ok",null);
From the above code in iPad version 10.2 and for Time Zone New York, U.S.A we are getting useDaylightTime as false. whereas in simulator its value is true.
is there any way to handle DST issue on iPads in codename one.
due to calendar code, we are getting 1 hour less from actual time.
Thanks in advance.
There was a bug in the iOS VM that is now fixed. The fix should be available on the build server soon (within the next day or so). That will fix this issue.
I'm using Tapku calendar for my iOS app. I have something to do like this.
I'm getting a JSON array of data from the web service. It's something like this:
dates":[{"day_id":1,"color_id":1},
{"day_id":2,"color_id":1},
{"day_id":3,"color_id":1},
{"day_id":4,"color_id":1},
{"day_id":5,"color_id":1},
{"day_id":6,"color_id":1},
{"day_id":7,"color_id":1},
{"day_id":8,"color_id":1},
{"day_id":9,"color_id":1},
{"day_id":10,"color_id":1},
{"day_id":11,"color_id":1},
{"day_id":12,"color_id":1},
{"day_id":13,"color_id":1},
{"day_id":14,"color_id":1},
{"day_id":15,"color_id":1},
{"day_id":16,"color_id":1},
{"day_id":17,"color_id":1},
{"day_id":18,"color_id":1},
{"day_id":19,"color_id":2},
{"day_id":20,"color_id":2},
{"day_id":21,"color_id":1},
{"day_id":22,"color_id":1},
{"day_id":23,"color_id":1},
{"day_id":24,"color_id":1},
{"day_id":25,"color_id":1},
{"day_id":26,"color_id":1},
{"day_id":27,"color_id":2},
{"day_id":28,"color_id":1},
{"day_id":29,"color_id":1},
{"day_id":30,"color_id":1},
{"day_id":31,"color_id":1}]}
Each day has a particular colour to show on the calender. colour_id 1 -red,2-green and 3-yellow.
I can change the
- (NSArray*)calendarMonthView:(TKCalendarMonthView *)monthView marksFromDate:(NSDate *)startDate toDate:(NSDate *)lastDate
by giving dates with the colour id. My problem is how can I change the select image in Tapkucalenderby checking the colour_id coming along with a particular date.
This is what I need to do with my TapkuCalender
I want to provide a user the ability to select a month\year I was going to just use 2 listboxes but I say that the Silverlight calendar had a year mode, which displays the months of a year (not the months with all the days).
But when you click on a month it switches to displaying the days in the month selected (month mode).
I tried switching back to the year mode in the SelectedDatesChanged event. But realized that fires only after I select a specific day in a month (at which point it does switch back the the year mode).
So my questions:
- can I get the calendar to stay in the year mode?
- is there an event for the month selected?
- can I even get the month select?
thanks
There is a DisplayModeChanged event that can be used. I my case I needed the first date and the last date of the selected month ... the code below does what I needed.
private void CalendarDisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
{
//control might be null at start up so check for null
//probably could hook up event in Loaded or constructor instead of xaml to prevent this
if (calendarInYearMode != null) {
//reset back to year mode
calendarInYearMode.DisplayMode = CalendarMode.Year;
if (calendarInYearMode.DisplayDate != DateTime.MinValue) {
var beginningOfMonthDate = calendarInYearMode.DisplayDate;
var endOfMonthDate = calendarInYearMode.DisplayDate.AddMonths(1).AddDays(-1);
}
}
}
I have an UltraCalendarCombo calendar control that I need to disable a set of dates in (weekends and public holidays basically).
I iterate through the list of dates for that month and set all the corresponding dates to disabled, this makes the current month look alright, but when I click the next month button on the control and try to access a month past now + 3 or 4 it jumps back to this month.
Has anyone any idea what this control is smoking, and where I can get some?
DateTimeCollection badDates = getMeSomeBadDatesmonth, year);
foreach (DateTime date in badDates)
{
myForm.CalendarInfo.DaysOfMonth[date.Day].Enabled = false;
}
Their controls have been going downhill for some time. I want to know what they are all smoking over there. I have been using their controls since the 2004 version of Net Advantage(which I really liked), but I have given up on using them on any new development. The bloat of features has broken what functionality did work and the documentation is just horrendous :(
Sorted it, the DaysOfMonth collection applies to a specific day (by number) of all months. For example, DaysOfMonth[10] applies to the tenth of every month of the year.
So I needed to use:
Infragistics.Win.UltraWinSchedule.Day theDay = _form.ValueDateCalInfo.GetDay(date, true);
if (theDay != null) theDay.Enabled = false;