Custom module DateFielElement issues
I've upgrated a custom module to 4.1 and now my date fields are appearining differenty on backend views. See the attached screenshot.
It has some other problems too. Now by default it is set to 1901/1/1 where as in 4.0 it was defaulted to the current system date. Now there aren't buttons to open the callendar. It openes only when the textfield get focused, with this it's really difficult to manually enter/modify the date. Another issue is the calendar controls seems very complex now and it overlaps with other buttons on the page.
Is it possible to have the carendar working as before with the same look and feel?
this is how I'm defining the date field in my custom modules definitions class.
We have changed the data picker control to use jquery UI date picker (jqueryui.com/.../) - since this control allows more powerfull localization scenarios. If you really need to have the old look and behaviour i can send you the code of the previous control. I am not sure why it defaults to 1901 in your case, Is it possible that the date field that you bind the control to already has this date. You can override the default date in your field by simply overriding your DataProvider CreateItem method to put the current date in the field. For example the OpenAccessNewsProvider has the following code:
public override NewsItem CreateNewsItem(Guid id)
var newsItem = new NewsItem(this.ApplicationName, id);
newsItem.Owner = SecurityManager.GetCurrentUserId();
var dateValue = DateTime.UtcNow;
newsItem.DateCreated = dateValue;
newsItem.PublicationDate = dateValue;
If you really need the original control please let me know. I can send the code and you can compile it in your custom module. Then when you use the DateField defintion you can override which control is used by explicitly settting the FieldType property.