Module Builder data entry problem
If you edit the XML and set a date\time to allow null
- It defaults to a date (where it should be blank)
- No validation message appears if you clear the box (good), but you get a javascript alert popup telling you it can't be null
Hello Steve,
I tested this, and indeed you can't enter null for the date/time field. I am getting a ValueType 'System.DateTime' cannot be null error, are you getting the same? I am thinking that this:Nullable DateTime would be needed in order for this to work. Upon a check in the database it is clear that the column accepts nulls.
All the best,
Atanas Valchev
the Telerik team
Yeah that's the error :) So whats the type become then?
<FieldType>DateTime?</FieldType>
<
DynamicModuleField
>
<
AllowImageLibrary
>false</
AllowImageLibrary
>
<
AllowMultipleFiles
>false</
AllowMultipleFiles
>
<
AllowMultipleImages
>false</
AllowMultipleImages
>
<
AllowMultipleVideos
>false</
AllowMultipleVideos
>
<
AllowNulls
>false</
AllowNulls
>
<
CanCreateItemsWhileSelecting
>false</
CanCreateItemsWhileSelecting
>
<
CanSelectMultipleItems
>true</
CanSelectMultipleItems
>
<
CheckedByDefault
>false</
CheckedByDefault
>
<
ChoiceRenderType
/>
<
Choices
/>
<
ClassificationId
>cb0f3a19-a211-48a7-88ec-77495c0f5374</
ClassificationId
>
<
ColumnName
/>
<
DBLength
/>
<
DBType
>DATE</
DBType
>
<
DdlChoiceDefaultValueIndex
>0</
DdlChoiceDefaultValueIndex
>
<
DecimalPlacesCount
>0</
DecimalPlacesCount
>
<
DefaultValue
/>
<
FieldType
>DateTime</
FieldType
>
<
FieldTypeDisplayName
>DateTime</
FieldTypeDisplayName
>
<
FileExtensions
/>
<
FileMaxSize
>0</
FileMaxSize
>
<
GridColumnOrdinal
>18</
GridColumnOrdinal
>
<
Id
>e0396978-c4b9-46d1-9d8a-3585112b5a4a</
Id
>
<
ImageExtensions
/>
<
ImageMaxSize
>0</
ImageMaxSize
>
<
IncludeInIndexes
>false</
IncludeInIndexes
>
<
InstructionalChoice
>- Select -</
InstructionalChoice
>
<
InstructionalText
>Session Date</
InstructionalText
>
<
IsHiddenField
>false</
IsHiddenField
>
<
IsRequired
>false</
IsRequired
>
<
IsRequiredToSelectCheckbox
>false</
IsRequiredToSelectCheckbox
>
<
IsRequiredToSelectDdlValue
>false</
IsRequiredToSelectDdlValue
>
<
IsTransient
>false</
IsTransient
>
<
LastModified
>2012-07-10T17:33:31.457Z</
LastModified
>
<
LengthValidationMessage
/>
<
MaxLength
>0</
MaxLength
>
<
MaxNumberRange
i:nil
=
"true"
/>
<
MediaType
/>
<
MinLength
>0</
MinLength
>
<
MinNumberRange
i:nil
=
"true"
/>
<
Name
>Date</
Name
>
<
NumberUnit
/>
<
Ordinal
>19</
Ordinal
>
<
ParentSectionId
>fe170c86-7e2e-4c02-b06a-6200f06a1347</
ParentSectionId
>
<
ParentTypeId
>b34c4038-0563-4b3e-a031-dd7493b4d97d</
ParentTypeId
>
<
RegularExpression
i:nil
=
"true"
/>
<
ShowInGrid
>false</
ShowInGrid
>
<
SpecialType
>None</
SpecialType
>
<
Title
>Date</
Title
>
<
TypeUIName
>
Date and Time
</
TypeUIName
>
<
VideoExtensions
/>
<
VideoMaxSize
>0</
VideoMaxSize
>
<
WidgetTypeName
>Telerik.Sitefinity.Web.UI.Fields.DateField</
WidgetTypeName
>
</
DynamicModuleField
>
Hello Steve,
I did some more research and at the moment there are some issues preventing the DateTime to be null.
I apologize if this causes you inconvenience.
Hmmm, okay, I have an ugly workaround, but I think it'll work...can it get a PITS issue created (just dont want to revisit this in 6 months if it isn't fixed anytime soon)
Hi,
Here is the PITS, it is in the pipe to be fixed for one of the future releases. Thank you for bringing it to our attention.
Regards,Thanks! :)