Is there any way to use umbraco's native date picker data type as macro parameter ? Instead of creating the date picker from scratch, i would like to use the native data type.
Just create an empty class that inherits from DatePropertyEditor. And you should pass en extra parameter (IsParameterEditor = true). You are done. :)
It will look like this one
using Umbraco.Core.PropertyEditors;
using Umbraco.Web.PropertyEditors;
namespace UmbracoTest.App_Plugins
{
[PropertyEditor("Date", "Datepicker for macro", "datepicker", IsParameterEditor = true)]
public class DateTimePickerTest : DatePropertyEditor
{
}
}
DateTime Picker as Macro Parameter
Hi,
Is there any way to get the datetime picker inside the macro parameter data type ?
I need to use this in Umbraco 7 as well as 6 + versions.
Thanks
Athul
Hi Athul,
For the solution for the Umbraco 7, i think that you should have a look on this https://github.com/umbraco/AngularWorkbook/blob/master/Exercises/Exercise10.md
Hope this helps for the Umbraco 7 part.
/Dennis
And for the Umbraco 6, I think at you should have a look here. http://our.umbraco.org/documentation/Extending-Umbraco/Macro-Parameter-Editors/
Hope this helps too.
/Dennis
Hi Dennis
Thanks for the quick response.
Is there any way to use umbraco's native date picker data type as macro parameter ? Instead of creating the date picker from scratch, i would like to use the native data type.
Thanks
Athul
Hi, Athul Jayan.
Yes, you can do it. it's very easy.
Just create an empty class that inherits from DatePropertyEditor. And you should pass en extra parameter (
IsParameterEditor = true
). You are done. :)It will look like this one
How would you do this now with the App_Plugins structure in U7?
Hi Jivan
I already done this by editing the umbraco source code , adding IsParameterEditor = true to the date picker class.
Thanks Jivan. Yours was way better than what i done..
Thanks
Athul
is working on a reply...