const dd = document.getElementById( 'date_delivery' );
const ints = document.querySelectorAll( '.form_radio_btn' );
dd.onchange = function() {
const dt = this.valueAsDate;
console.log( ymdhi( dt) );
ints.forEach( int => disen( int, dt ) );
}
dd.valueAsDate = new Date();
dd.onchange();
function disen( int, dt ) {
const [ h1, i1, h2, i2 ] = int.querySelector( '.form_radio_btn label' ).innerText.split( /\D+/ );
const { year, month, date } = ymdhi( dt );
const d1 = new Date( year, month, date, h1, i1, 0 );
const d2 = new Date( year, month, date, h2, i2, 0 );
const now = new Date();
int.querySelector( '.form_radio_btn input' ).disabled = ( now > d1 );
}
function ymdhi( now ) {
const year = now.getFullYear();
const month = now.getMonth();
const date = now.getDate();
const hours = now.getHours();
const minutes = now.getMinutes();
return { year, month, date, hours, minutes }
}