We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Month text cutted (it does not display entirely)

Hi, I attach here an image with my problem.
Basically the month is cutted in android (in iOS it works perfecly).
My view is the following:
using IDboxMobile.Controls;
using IDboxMobile.Helpers;
using IDboxMobile.Models;
using IDboxMobile.Platform;
using IDboxMobile.Resources;
using IDboxMobile.Services.Rest;
using IDboxMobile.Services.Settings;
using Refit;
using SMFramework;
using SMFramework.Views;
using Syncfusion.SfCalendar.XForms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace IDboxMobile.Views
{
public class CalendarView : BaseContentPage
{
public event EventHandler AcceptClicked;
SfCalendar calendar;
DateTime _startDate, _endDate;
public CalendarView(DateTime startDate, DateTime endDate)
{
ToolbarItems.Add(new ToolbarItem(AppResources.OK, "", AcceptButton));
ToolbarItems.Add(new ToolbarItem(AppResources.Cancel, "", CancelButton));
this._startDate = startDate;
this._endDate = endDate;
Content = GetLayout();
//SetDates();
this.BindingContext = new ViewModels.CalendarVM();
}
//private void SetDates()
//{
// List sdates = new List();
// for (DateTime i = this._startDate.Date; i <= this._endDate.Date; i = i.AddDays(1))
// {
// sdates.Add(i);
// }
// calendar.SelectedDates = sdates;
//}
private void AcceptButton(object sender, EventArgs e)
{
AcceptButton();
}
private void CancelButton(object sender, EventArgs e)
{
CancelButton();
}
private async void AcceptButton()
{
DateFilterEventArgs args = new DateFilterEventArgs();
try
{
if (calendar.SelectedDates != null && calendar.SelectedDates.Count > 1)
{
var orderedDates = calendar.SelectedDates.OrderBy(x => x).ToList();
DateTime startDate = orderedDates[0];
DateTime endDate = orderedDates[orderedDates.Count - 1];
bool fechaIncorrecta = (startDate.Date > endDate.Date);
args.startDate = fechaIncorrecta ? _startDate : startDate.Date;//do not change the dates if the user puts wrong dates
args.endDate = fechaIncorrecta ? _endDate : endDate.Date;
AcceptClicked(null, args);
await Navigation.PopModalAsync();
}
else
{
((ViewModels.CalendarVM)this.BindingContext).DialogService.ShowError(AppResources.SelectInitAndEndDates);
}
}
catch (Exception ex)
{
DependencyService.Get().WriteLogException(ex, CustomLogPriority.Error);
}
}
private async void CancelButton()
{
await Navigation.PopModalAsync();
}
private View GetLayout()
{
calendar = new SfCalendar()
{
MaxDate = DatesHelper.GetDateTimeNow(),
Locale = DependencyService.Get().GetCurrentCultureInfo(),
SelectionMode = SelectionMode.MultiSelection,
//SelectionMode = SelectionMode.RangeSelection, //cuando los de syncfusion nos respondan con cómo podemos seleccionar el rango entre meses.
};
calendar.SelectionChanged += Calendar_SelectionChanged;
return calendar;
}
private void Calendar_SelectionChanged(object sender, SelectionChangedEventArgs args)
{
//SetDates();
}
}
}

Attachment: 20170705PHOTO00000126_7bc3c52.zip

1 Reply

RK Rathana Kumar Sekar Syncfusion Team July 6, 2017 12:04 PM UTC

Hi David Perera,

Thanks for contacting Syncfusion Support.

We could reproduce the reported issues "Issue with month header sizing" from our side. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/

Regards,
Rathanakumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon