Calendar Field:-

Power Apps Portals is a Microsoft Power Platform feature that allows organizations to create websites that extend their business processes and data to external users.

Steps:-

1. Create web template, page template, web page and create a multi step form

Calendar Field

2. In web template write source code or liquid code is

{% block main %}
{% if page.adx_webform %}
{% webform id: page.adx_webform.id %}
{% endif %}
{% endblock %}

3. In multistep form in form options write the jQuery code like this in custom java script below $(document).ready(function () {
var datetimepicker = $(“div.control”)[1];
var datetimepicker3 = $(“div.control”)[3];
$(datetimepicker3).children().css(“text-decoration”, “none”);
$(“#vijay_startdate”).next().data(“DateTimePicker”).minDate(moment());
$(“#vijay_enddate”).next().data(“DateTimePicker”).minDate(moment());
$(datetimepicker).on(“dp.change”, function (e) {
datevalidation();
})
});

function datevalidation() {
var dateValue = $(“#vijay_startdate”).val();
var dateValue2 = $(“#vijay_enddate”).val();
if (!dateValue) {
return;
}
if (!dateValue2) {
return;
}

var date = new Date(dateValue);
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var crtdate = new Date();
var c_month = crtdate.getMonth() + 1;
var c_day = crtdate.getDate();
var c_year = crtdate.getFullYear();
if (c_year === year) {
if (c_month === month && c_day > day) {

}
else if (c_month > month) {

}
}
else if (c_year > year) {

}

var dateend = new Date(dateValue2);
var dayend = dateend.getDate();
var monthend = dateend.getMonth() + 1;
var yearend = dateend.getFullYear();
if (c_year === yearend) {
if (c_month === monthend && c_day > dayend) {

}

else if (c_month > monthend) {

}
}

else if (c_year > yearend) {

Event.preventDefault();
}
}

4. Give table permissions then sync and preview the web page

5. Then we get the output like this

6. It will be show only current date not in previous date

7. same like this in end date also

8. Without underscore in Email field

For any Help or Queries Contact us on info@crmonce.com or +91 9493926112

https://www.crmonce.com/how-to-create-microsoft-power-apps-90-days-online-trial-version-and-an-environment/